Possible Duplicate:
How do I prevent the app from terminating when I close the startup form?
Imagine an application with 2 forms, Form1 and Form2. When I click on a button in Form1 i want to open Form2 and close Form1, close not hide. The way I was doing it was:
_Form2 = new Form2();
_Form2.Show();
this.Close();//or this.Dispose();
When I run the code it closes the form1 and ends the application. Im not sure but it maybe because in my Program.cs I have Application.Run(new Form1());
? Or this line only means that when the Application start it should load the Form1?