Console/Windows application

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
W

wheels619

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top