PDA

View Full Version : General Console Application Window


Mechlar
10-23-2005, 10:33 PM
I am new student in a software engineering program. I have started finally in a visual basic class. We are starting to write simple programs in cpp and cs. Our teacher is having us write programs in visual basic using the console application template. When we run a completed project the window opens performs the code and then closes. Is there a way to prevent the console window from immediatly closing after the program runs. That is there a specific command you can add the code to keep the window open so that a user has to manually close the window to teminate the window?
Thanks,

Mechlar
10-23-2005, 11:48 PM
I found further in my reading that you can keep the window alive by using the console.read rather than console.write. I guess I just overlooked the problem and my reading material :)

oracleguy
10-24-2005, 07:45 AM
I assume you are using visual studio, if you want to run your program and don't want it to close the console window at the end of the program, you can run it without debugging and it will ask you to press a key before closing.