ARTICLE

How to arrange The display of Multiple MDI Child Forms In VB.Net

Posted by Manish Tewatia Articles | Visual Basic Language July 14, 2010
In this article you learn how to use LayoutMdi method with MdiLayout enumeration for the Mdi parent form.
Reader Level:

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 wiyh 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

  1. 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.
     
    1.gif

  2. Add one More control in Main form MenuStrip As Cascade Windows.

      2.gif
     

  3. Double click on Cascade windows control and write this Code.

    Private Sub CascadeWindowsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles       CascadeWindowsToolStripMenuItem.Click
    Me.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade)
    End Sub

     

  4. Debug the application and click on New button two times than 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.

      3.gif

      4.gif

Summary

In this article, we discussed how to arrange MDI Child Form in Cascading mode using Visual Studio 2010 and VB.NET

Login to add your contents and source code to this article
share this article :
post comment
 
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor