0

Simple question:

I used Application.Run to start my application because I need it this way.

Now I want to add a form later in the code. But it doesn't open the form if I use new Form1. Instead it runs everything else in the constructor of the class Form1. So somehow it ignores to open the form.

Craiy
  • 143
  • 1
  • 1
  • 9

1 Answers1

2

Just newing up a form makes it exist in memory but does not display anything.

You have to show it:

// create instance of Form1, does not show it
var myForm = new Form1();
// show the form.
myForm.Show();

see msdn documentation

Kris
  • 40,604
  • 9
  • 72
  • 101