本文介绍了在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();
}



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

05-26 08:42
查看更多