public void verification(string m1, string m2,int id) { if (m1.Equals(m2)==true) { Form1 x = new Form1(id); x.ShowDialog(); this.close(); } else { MessageBox.Show("eurreur"); } }
Form Prog = new formProg(); Prog.Show(); this.Hide();
Prog.Closed+= new EventHandler(Prog_Closed); ... public void Prog_Closed(object sender, EventArgs e) { this.Show(); }