View Single Post
Old 01-03-2006, 06:01 PM   #1 (permalink)
QUantumAnenome
Code Monkey
 
Join Date: Mar 2005
Posts: 56
QUantumAnenome is on a distinguished road
Send a message via Yahoo to QUantumAnenome
windows console app

Is there a way a console app can query if it was run from inside a DOS box as opposed to being double clicked?

The reason is that I'm tired of putting getch() at the end of all my quick test programs to avoid the printed answers from not being seen. If I open a DOS box and run the app from there, no problems. But being lazy, if I double click to run it, it runs, prints out info, and closes. It would be nice to be able to detect and only put in the getch() if the app was double clicked.

Thanks!
QUantumAnenome is offline   Reply With Quote