Re: Execute a Window Application in Command Line
From: Stoitcho Goutsev \(100\) [C# MVP] (100_at_100.com)
Date: 06/10/04
- Next message: Simon Harvey: "Urgent problem: Any help greatly appreciated"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Asycnch file reading ?"
- In reply to: Ram: "Re: Execute a Window Application in Command Line"
- Next in thread: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Execute a Window Application in Command Line"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Jun 2004 10:43:54 -0400
Hi Ram if you want to have always that console window runing the easiest way
is to start a WindowsForms application and then go to the project settings
and change the 'Output Type' to 'Console Application'. This way you'll have
windows application the will have console window attached as soon as you
start the application. The other way is to create a console application (as
Marc suggested and add reference to System.Windows.Forms and may one or two
assemblies more) and then in the main method only you have to do is to
create a form and call Application.Run(form). Where 'form' is reference to
the form you just created (the main form of the application). You can also
move the entry point (main method) in the form class and get rid of the
class the wizard created for you
-- HTH Stoitcho Goutsev (100) [C# MVP] "Ram" <ninja@bezeqint.net> wrote in message news:OqgOJnuTEHA.2908@TK2MSFTNGP10.phx.gbl... > Hey, > After I create the Console App, how can I open a windows Form? > Thanks ahead > > -- Ram > "Marc Scheuner [MVP ADSI]" <m.scheuner@inova.SPAMBEGONE.ch> wrote in message > news:a24gc0tpv20gv7bhm1bb6gb8q0cnp6vk8n@4ax.com... > > >Unfortunately AFIAK .NET doesn't have managed support for creating > consoles. > > > > ?!?!?!?!?? Have you checked out the "File > New > Project > Visual C# > > Projects > Console Application" ?? > > > > Yes, there are some drawbacks in terms of mostly keyboard support > > (waiting and reading just a single keypress and such), but you can > > most definitely write fully functional console apps in C# / .NET. > > > > Marc > > ================================================================ > > Marc Scheuner May The Source Be With You! > > Bern, Switzerland m.scheuner(at)inova.ch > >
- Next message: Simon Harvey: "Urgent problem: Any help greatly appreciated"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Asycnch file reading ?"
- In reply to: Ram: "Re: Execute a Window Application in Command Line"
- Next in thread: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Execute a Window Application in Command Line"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|