Hi cotdot11111,
If you mean popup form2 when you click a button in form1, so form1 cannot be close after form2 is shown. You can set form1's Visible to false and close it after form2 is close.
private void button1_Click(object sender, EventArgs e)
{
Form2 form2 = new Form2();
this.Visible = false;
form2.ShowDialog();
this.Close();
}
If you want to show form2 after form1 is closed, you can change Program.cs into this.
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Application.Run(new Form2());
}
Hope this help you.
Sincerely,
Kira Qian
Please mark the replies as answers if they help and unmark if they don't.