开发者

What are the dimensions of the Windows CMD/Command Prompt?

I know that the Command Prompt i开发者_运维知识库s 80 characters across and 300 characters down by default. Here's the difficulty: I'm trying to create a C# WinForms window that is the exact same size as the command prompt window. What width and height should I use to get the window to be the same size?

EDIT: All I'm looking for is to recreate the size of the command prompt window with a C# WinForms window. What width/height should I use?


Default window size should be 80x25. Default buffer size is 80x300.


If you have a console process you can call GetConsoleWindow and then GetWindowRect.


You need to run cmd, take a screenshot, paste the image into an image editor, cut the cmd window, paste it into its own image and then view the size of the new image. That will give you the x and y lengths in pixels.


The default command prompt dimensions are 677, 343. The height being 677 and the width being 343, hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜