Export (0) Print
Expand All
Expand Minimize

Form.LayoutMdi Method

Arranges the multiple-document interface (MDI) child forms within the MDI parent form.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

'Declaration
Public Sub LayoutMdi ( _
	value As MdiLayout _
)

Parameters

value
Type: System.Windows.Forms.MdiLayout

One of the MdiLayout values that defines the layout of MDI child forms.

You can use this method to arrange the MDI child forms in your MDI parent form to allow for easier navigation and manipulation of MDI child forms. MDI child forms can be tiled horizontally and vertically, cascaded, or as icons within the MDI parent form.

The following code example shows the event handlers for the menu items of a Window menu in an MDI application's parent form. Each event handler makes calls to the LayoutMdi method to arrange any child forms that are currently open in the application.

Private Sub HorizontallyTileMyWindows(sender As Object, e As System.EventArgs)
    ' Tile all child forms horizontally. 
    Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub 'HorizontallyTileMyWindows


Private Sub VerticallyTileMyWindows(sender As Object, e As System.EventArgs)
    ' Tile all child forms vertically. 
    Me.LayoutMdi(MdiLayout.TileVertical)
End Sub 'VerticallyTileMyWindows


Private Sub CascadeMyWindows(sender As Object, e As System.EventArgs)
    ' Cascade all MDI child windows. 
    Me.LayoutMdi(MdiLayout.Cascade)
End Sub 'CascadeMyWindows

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft