I am in Form1
Designer Window and I have a Button
. When I click on the Button
, I should navigate from Form1
to Form2
. However, Form1
designer window should get closed.
In the below code when I click on the Button
, Form2
window will popup. The issue is Form1
will also be there on the computer screen along with Form2
. I wish to see only the window to which I would like to navigate, and the other should disappear.
How to correct the below code accordingly?
private void button1_Click(object sender, EventArgs e)
{
Form2 Check = new Form2();
Check.Show();
}