To adjust size of your console window, only modify the size of cmd.exe console. Because implicitly cmd.exe provides console to our exe. Here is the steps: 1. Right click on TitleBar 4. Goto Property 5. Set the height and width as per your requirement 6. Press OK and Check option 'Save properties for future windows'. Tried searching but everything seems to be for VB C. Is this even possible in dev c if so please tell me how to do it Dev-C has no its own console window, it's Windows OS console window of your application started from the Dev-C IDE. After a little testing I don't think its possible to.
-->
Definition
Sets the height and width of the console window to the specified values.
- Jan 24, 2014 When I call my launcher (called from another.NET desktop app via Process class), I dont want the console window to appear even for a moment but I can not prevent it to appear and then disappear instantly. I searched a lot and tried many things to hide it, but I couldn't success. Here is the C codes I used for the launcher app.
- OnlineGDB is online IDE with C compiler. Quick and easy way to compiler c program online. It supports g compiler for c.
- Aug 25, 2010 How to stop the output console from closing after running your C program. C Beginner's Tutorial: Pausing a console program the right way. How to Keep Console Window Open in C# /.
Parameters
- width
- Int32
The width of the console window measured in columns.
- height
- Int32
The height of the console window measured in rows.
Exceptions
width
or height
is less than or equal to zero.-or-
width
plus WindowLeft or height
plus WindowTop is greater than or equal to MaxValue.-or-
width
or height
is greater than the largest possible window width or height for the current screen resolution and console font.The user does not have permission to perform this action.
An I/O error occurred.
The current operating system is not Windows.
Examples
This example demonstrates the SetWindowSize method, and the WindowWidth and WindowHeight properties. You must run the example to see the full effect of changing the console window size.
The example reports the dimensions of a console window set to 85 columns and 43 rows, then waits for a key to be pressed. When any key is pressed, the dimensions of the console window are halved, the new dimensions are reported, and the example waits for another key press. Finally, when any key is pressed, the console window is restored to its original dimensions and the example terminates.
Applies to
C++ Hide Console Window
When I compile and run my programs in Dev C++, the output window opens and shows the output. Then instanlty the window flashes and disappears.
How do I make the window stay long enough for me to read the output??
Google Dev Console
Thanks
- 5 Contributors
- forum 12 Replies
- 6,921 Views
- 2 Days Discussion Span
- commentLatest Postby DuoasLatest Post
twomers408
The problem is (not really a problem), that the program is running too fast and doesn't have anything to stop it from closing. There are a number of options to solve this, most of them are mentioned here -- '>http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385 so if you're using C++ throw a
cin.ignore();
and cin.get();
before you return 0;
at the end of your program