且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在MDI应用程序中关闭子窗口

更新时间:2022-06-21 19:59:55

foreach (Form f in this.MdiChildren)
   f.Close()



现在,如果您想关闭特定窗口,可以尝试类似
的东西



now if u want to close Specific window u can try somthing like

foreach (Form f in this.MdiChildren)
{
     if(f.Name =="Some text")
        f.close();
}


希望 WPF的多窗口界面 CP的[ ^ ]可能会对您有所帮助.
Hope Multiple Window Interface for WPF[^]article from CP might help you.