To close or exit the Windows command line window, also referred to as command or cmd mode or DOS mode, type exit and press Enter . The exit command can also be placed in a batch file. Alternatively, if the window is not fullscreen, you can click the X close button in the top-right corner of the window.
To keep the console window open in Visual Studio without using the Console. ReadLine() method, you should run the application without debug mode by pressing Ctrl+F5 or by clicking on the menu Debug > Start without Debugging option. This way the application remains active below until the user presses a key.
Console2 is a great little front-end for your existing shell, no matter what it is. Note that Console2 isn't a shell itself, it's just a face on whatever you are already using.
You can simply press Ctrl + F5 instead of F5 to run the built code. Then it will prompt you to press any key to continue. Or you can use this line -> system("pause"); at the end of the code to make it wait until you press any key.
Sorry for the self-promotion, I'm the author of another Console Emulator, not mentioned here.
ConEmu is opensource console emulator with tabs, which represents multiple consoles and simple GUI applications as one customizable GUI window.
Initially, the program was designed to work with Far Manager (my favorite shell replacement - file and archive management, command history and completion, powerful editor). But ConEmu can be used with any other console application or simple GUI tools (like PuTTY for example). ConEmu is a live project, open to suggestions.
A brief excerpt from the long list of options:
Far Manager users will acquire shell style drag-n-drop, thumbnails and tiles in panles, tabs for editors and viewers, true colors and font styles (italic/bold/underline).
PS. Far Manager supports UNC paths (\\server\share\...)
Try Console 2.
Console is a Windows console window enhancement. Console features include: multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, different window styles
Take Command. This one has been around for a long time (formerly 4DOS). I used this on Windows NT 3.5 (!) and loved it.
Cygwin lets you run X on Windows, so you can fire up xterm
or whatever terminal app you prefer, and also get the benefit of using a UNIX shell.
Even with those, cmd.exe isn't a great console. See all the other replies and the earlier stackoverflow questions on the same subject. The "Console" project from sourceforge looks pretty good.
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