首页 > 技术文章 > C# winform 打开新窗体 关闭当前窗体

hanke123 2016-04-06 15:44 原文

Form1 的Button 下

{

Form2 f2 = new Form2();
f2.ShowDialog(this);//
this.Close();

}

 

Form2 的load 下

{

//只能隐藏不能关闭

this.owner.hide();

}

推荐阅读