在MDI应用程序中关闭子窗口 [英] Close child window in MDI Application

查看:72
本文介绍了在MDI应用程序中关闭子窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从MDI容器关闭子窗口.
生成了子窗口的集合.我发现很难指出集合中的子窗口"编号.

How to close the child window from the MDI container.
The collections of child windows were generated. I found difficult to point out the Child windows number in the collection.

推荐答案

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.


这篇关于在MDI应用程序中关闭子窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆