开发者

Cascade window programmatically using C# application

I'm programming c# application I have a parent form and others are childs I want to cascade all windows which are open as child form in my parent form how I can cascade windows or close all or minmize them I mean functionality for child window that can calls form parent window开发者_如何学编程.


On a MDI Form:

using System.Windows.Forms;

// cascade
this.LayoutMdi(MdiLayout.Cascade);

// close all
Form[] children = this.MdiChildren;
for (int i = 0; i < children.Length; i++) {
    children[i].Close();
}

// minimize all
foreach (Form child in this.MdiChildren) {
    child.WindowState = FormWindowState.Minimized;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜