方法一:
1 2 3 4 5 6 7
| form2.Closed += (ss,ee)=> { this.Close(); };
foreach (var item in Application.OpenForms) { if (item is Form1) item.Close(); }
|
方法二:
1 2 3 4 5 6 7 8 9 10 11
| B new_form = new B(); new_form.owner = this; this.hide(); new_form.showdialog(); Application.ExitThread();
Application.ExitThread();
this.hide();
|
转自:https://www.cnblogs.com/huanhuan86/archive/2013/02/21/2920303.html