user496949
user496949

Reputation: 86085

Can I start a windows form from a console program

I'd like to start a new windows form from a console program. Is this possible?

Upvotes: 0

Views: 2473

Answers (2)

Greg Sansom
Greg Sansom

Reputation: 20840

Add a reference to Windows.Forms, then:

static void Main(string[] args)
{
    Application.EnableVisualStyles();
    Application.Run(new Form()); //of course you can put your own custom Form here.
}

Upvotes: 6

Sisiutl
Sisiutl

Reputation: 4985

Use "start"

C:> start yourprogram.exe

Upvotes: -1

Related Questions