In WinForms you run a single
Application instance at a time, but that Application can show any number of Forms.
When you create a WinForms project in Visual Studio: it creates a
default application structure that starts the Application by invoking a static method 'Main in the static Class 'Program.cs that shows one Form, the Main Form.
Take a look inside your Program.cs file, in the Main method: you'll see something like this:
Application.Run(new Form1());
That starts the Application, and tells it to create a new instance of Form1, and make it visible.
Then, within the Main Form you can create instances of, and show, other Forms. Those other Forms created are not (technically) "child Forms" of your Main Form, but, the default behavior is: when the Main Form is closed, all other created Form instances are closed along with it.
That is the
standard WinForms model, and it's a good idea for you to get familiar with it.
In fact, any Class in WinForms can create a new instance of any Form you created the template for at design-time, or create a new Form "from nothing," which you did not create at design-time.
But, as long as you are using the "standard model" WinForms structure, all Forms created anywhere in your code will be closed when the Main Form is closed.
So, you've defined two Forms, the first, Form1, is your main Form, and the second, Form2, is your other Form. In your code for Form1.cs:
private Form2 theSecondForm = new Form2();
private Form theRawForm =new Form();
private void Form1_Load(object sender, EventArgs e)
{
theSecondForm.Show();
theSecondForm.Location = new Point(Right, Top);
theRawForm.Show();
theRawForm.Name = "aRawForm";
theRawForm.Text = "I came from nothing";
theRawForm.Location = new Point(Right, Top + theSecondForm.Height);
}
There are ways you can alter the structure of WinForms applications so they do not conform to the "standard model," but before you explore those, it's good, imho, to have a sound understanding, and competency with the standard model.