PC Review


Reply
Thread Tools Rate Thread

How to prevent the console window popping up.

 
 
=?Utf-8?B?UmFt?=
Guest
Posts: n/a
 
      23rd Jun 2005
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.
 
Reply With Quote
 
 
 
 
JSheble
Guest
Posts: n/a
 
      24th Jun 2005
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" <(E-Mail Removed)> wrote in message
news:782CDB40-65A3-4A79-93AA-(E-Mail Removed)...
>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.



 
Reply With Quote
 
John Timney \(ASP.NET MVP\)
Guest
Posts: n/a
 
      24th Jun 2005
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" <(E-Mail Removed)> wrote in message
news:782CDB40-65A3-4A79-93AA-(E-Mail Removed)...
>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.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popping dialogs up on a console app Michael A. Covington Microsoft C# .NET 5 11th Jan 2009 08:14 AM
Prevent 'Dialog Box' from popping up TonyU Microsoft Access Forms 2 28th Mar 2007 06:41 PM
Hou to prevent windows from popping up on top? =?Utf-8?B?RmFiaWFubw==?= Windows XP Customization 1 14th Mar 2006 09:14 PM
How to prevent windows from popping up on top? =?Utf-8?B?RmFiaWFubw==?= Windows XP General 0 6th Mar 2006 07:23 PM
How to prevent Solver Results Box from popping up? ernestgoh Microsoft Excel Discussion 3 15th Oct 2005 06:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.