Groups | Blog | Home
all groups > dotnet general > june 2005 >

dotnet general : How to prevent the console window popping up.


Ram
6/23/2005 2:42:02 PM
I have a console application that brings up a dialog if invoked with no
command line parameters. If I double click on my application a console window
is briefly displayed before the dialog appears (I have this code in my app:

if (args.length ==0) FreeConsole() which causes the console to be closed)

Is there a way to prevent this console window from appearing in the first
John Timney (ASP.NET MVP)
6/24/2005 12:00:00 AM
have you tried compiling it as a winexe in the target /t parm of the
compiler options, if it has no interface it wont spawn a console.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

[quoted text, click to view]

JSheble
6/24/2005 8:20:05 AM
It's a console app, so of course it going to open a console if you double
click it from windows explorer. Open a DOS Prompt window
(Start->Run->cmd.exe), then run your console app, and no console window
opens.


[quoted text, click to view]

AddThis Social Bookmark Button