471,349 Members | 1,266 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

How to prevent the console window popping up.

Ram
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
place.
Jul 21 '05 #1
2 2846
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.
"Ram" <Ra*@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
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
place.

Jul 21 '05 #2
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

"Ram" <Ra*@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.com...
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
place.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Scott | last post: by
1 post views Thread by James Carnley | last post: by
1 post views Thread by Matt | last post: by
6 posts views Thread by Giojo | last post: by
5 posts views Thread by thinktwice | last post: by
5 posts views Thread by Scott | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.