赞
踩
1、父窗体Form1中调用子窗体Form2代码:
Form2 fr = new Form2();
fr.ShowDialog(this);
2、子窗体的FormClosed事件代码:
private void Form2_FormClosed(object sender, FormClosedEventArgs e)
{
Form1 fr = new Form1();
fr = (Form1)this.Owner;
fr.Dispose();
fr.Close();
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。