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;
}
精彩评论