how to cose form after laucnhed new form code example
Example: open a new form with a button and close the last one
this.Hide();
var form2 = new Form2();
form2.Closed += (s, args) => this.Close();
form2.Show();
this.Hide();
var form2 = new Form2();
form2.Closed += (s, args) => this.Close();
form2.Show();