I know that the Command Prompt is 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With