form1里的按钮事件处理器
form2 f2=new form2();
form3 f3=new form3();
f2.Show();
f3.Show();
------------------------------
form2里的FormClosed事件里这样写
if (Application.OpenForms["Form3"] != null)
{
Application.OpenForms["Form3"].Close();
}
------------------------------------
form3里的FormClosed这样写
if (Application.OpenForms["Form2"] != null)
{
Application.OpenForms["Form2"].Close();
}
网友评论