Advertisement

09.27.2007 at 07:00PM PDT, ID: 22858502
[x]
Attachment Details

Console app that can launch Windows Form

Asked by gromul in C# Programming Language, Windows Programming, .NET

Tags: console, windows, form, launch, app

I'm trying to create an app with the following behavior:
1) If no command line argumentsare passed to it, it launches GUI
2) If command line arguments are passed to it, it operates in the console mode.

I can do this by having the console app launch GUI if there are no arguments, but there are several problems with that:
1) If launching the app from the explorer, a console window appears besides the windows form and stays there. If it's closed, the form is closed too.
2) If launching GUI from the console window, the console is waiting for the windows form to be closed (unlike when launching notepad i.e.).

Is there a good solution to this?

ThanksStart Free Trial
[+][-]09.27.2007 at 08:47PM PDT, ID: 19976404

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:06AM PDT, ID: 19978331

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:08AM PDT, ID: 19978345

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:12AM PDT, ID: 19978367

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C# Programming Language, Windows Programming, .NET
Tags: console, windows, form, launch, app
Sign Up Now!
Solution Provided By: OnegaZhang
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.28.2007 at 10:08AM PDT, ID: 19980198

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628