Introduction As my previous article helps you to learn create procedures. Now I am going to tell about the working of LayoutMdi Method. The LayoutMdi Method is used with MdiLayout enumeration to rearrange the child forms in an MDI Parent Form. Get to Work With the help of below given example, you can learn how to use LayoutMdi method with MdiLayout enumeration for the Mdi Parent Form and you have to use enumeration in the code of click event of the Cascade Windows menu item.
Step to Create and Implement MDI Child Form
Assumes there is an MDI parent form having MenuStrip with option New, Window and Close in New Menu, main form contain one Child form having a RichTexBox. For details, see Creating an MDI Form.
Add one more control in Main Form MenuStrip as Cascade Windows.
Double click on Cascade Windows control and write this Code. private void cascadeWindowToolStripMenuItem_Click(object sender, EventArgs e) { this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); }
Debug the application and click on New button two times then two MDI Child form with RichTextBox will open. Now by using Cascade Windows control in the Main Menu you can arrange all the opened Mdi Child Form in Cascade mode.
SummaryIn this article, we discussed how to arrange MDI Child Form in Cascading mode using Visual Studio 2010 and C#.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: