Console/Windows application

  • Thread starter Thread starter wheels619
  • Start date Start date
W

wheels619

Hi,
I have a program that has options to run as both a GUI and a console.
The program entry point has a c# file with the "static main...."
It checks some parameters, if no parameters, it launches the GUI by:

if(args.Length == 0)
{
Application.Run(new MainForm());
}

If I double click on the application, a blank console window will open
along with the GUI window.
How can I make the blank console window not open??

Thanks
 
Have you set your app up as a console application or a windows
application? It seems like it is set up as a console application. Change
it to a windows application, and it should be fine.

Hope this helps.
 
Hi there,
If I set it to a windows app and I try to run it via the console
version, it wil not output anything onto the console screen.

I'm trying to create one program that has both a console and GUI
front-end.

Tommy
Have you set your app up as a console application or a windows
application? It seems like it is set up as a console application. Change
it to a windows application, and it should be fine.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,
I have a program that has options to run as both a GUI and a console.
The program entry point has a c# file with the "static main...."
It checks some parameters, if no parameters, it launches the GUI by:

if(args.Length == 0)
{
Application.Run(new MainForm());
}

If I double click on the application, a blank console window will open
along with the GUI window.
How can I make the blank console window not open??

Thanks
 
Back
Top