Look at your application's entry point (usually "
Main
"). It has the line:
Application.Run(new Form1());
This start of application defines what is your main form. When you close a main form, the whole application quits (unless you handle
FormClosing
event to cancel it).
If you want to show other forms, you need to… well, show them:
Form newForm = new Form2();
newForm.Show();
Form mainForm = new Form1();
Application.Run(mainForm);
Form newForm = new Form2();
mainForm.AddOwnedForm(newForm);
newForm.ShowInTaskbar = false;
newForm.Show();
Making a form owned by a main form makes them activate together, which help integrity if application behavior. In this way, no window from other application can appear in Z order between the forms of your application. Not showing a form in a task bar complements this behavior. In this way, only a main form represents whole application it the task bar.
See:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[
^].
—SA