I looked at this blog post, which looks like it will work, and uses the concept of the event handler from the D2VIANT answer
http://www.dotnetcurry.com/ShowArticle.aspx?ID=125
:
1. Windows. Visual Studio 2005 2008. "" > "" > "" > " Visual Basic Visual # " " > " Windows ". > .
2: n
ew . > > Windows Forms > Form2.cs > .
3: Form1 "btnOpenForm" , . . frm2_FormClosed, :
private void btnOpenForm_Click(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.FormClosed += new FormClosedEventHandler(frm2_FormClosed);
frm2.Show();
this.Hide();
}
private void frm2_FormClosed(object sender, FormClosedEventArgs e)
{
this.Close();
}