Form.LayoutMdi-Methode
Ordnet die untergeordneten MDI (Multiple Document Interface)-Formulare im übergeordneten MDI-Formular an.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
Public Sub LayoutMdi ( _
value As MdiLayout _
)
'Usage
Dim instance As Form
Dim value As MdiLayout
instance.LayoutMdi(value)
public void LayoutMdi (
MdiLayout value
)
public:
void LayoutMdi (
MdiLayout value
)
public void LayoutMdi (
MdiLayout value
)
public function LayoutMdi (
value : MdiLayout
)
Parameter
- value
Einer der MdiLayout-Werte, der das Layout der untergeordneten MDI-Formulare bestimmt.
Hinweise
Mit dieser Methode können Sie die untergeordneten MDI-Formulare im übergeordneten MDI-Formular anordnen, um die Navigation und Bearbeitung der untergeordneten MDI-Formulare zu erleichtern. Untergeordnete MDI-Formulare können untereinander, nebeneinander, überlappend oder als Symbole im übergeordneten MDI-Formular angeordnet werden.
Beispiel
Im folgenden Codebeispiel werden die Ereignishandler für die Menüelemente eines Fenstermenüs in einem übergeordneten Formular einer MDI-Anwendung veranschaulicht. Alle Ereignishandler rufen die LayoutMdi-Methode auf, um alle untergeordneten Formulare anzuordnen, die derzeit in der Anwendung geöffnet sind.
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
private void HorizontallyTileMyWindows (object sender, System.EventArgs e)
{
// Tile all child forms horizontally.
this.LayoutMdi( MdiLayout.TileHorizontal );
}
private void VerticallyTileMyWindows (object sender, System.EventArgs e)
{
// Tile all child forms vertically.
this.LayoutMdi( MdiLayout.TileVertical );
}
private void CascadeMyWindows (object sender, System.EventArgs e)
{
// Cascade all MDI child windows.
this.LayoutMdi( MdiLayout.Cascade );
}
private:
void HorizontallyTileMyWindows( Object^ sender, System::EventArgs^ e )
{
// Tile all child forms horizontally.
this->LayoutMdi( MdiLayout::TileHorizontal );
}
void VerticallyTileMyWindows( Object^ sender, System::EventArgs^ e )
{
// Tile all child forms vertically.
this->LayoutMdi( MdiLayout::TileVertical );
}
void CascadeMyWindows( Object^ sender, System::EventArgs^ e )
{
// Cascade all MDI child windows.
this->LayoutMdi( MdiLayout::Cascade );
}
public void HorizontallyTileMyWindows(Object sender, System.EventArgs e)
{
// Tile all child forms horizontally.
this.LayoutMdi(MdiLayout.TileHorizontal);
} //HorizontallyTileMyWindows
public void VerticallyTileMyWindows(Object sender, System.EventArgs e)
{
// Tile all child forms vertically.
this.LayoutMdi(MdiLayout.TileVertical);
} //VerticallyTileMyWindows
public void CascadeMyWindows(Object sender, System.EventArgs e)
{
// Cascade all MDI child windows.
this.LayoutMdi(MdiLayout.Cascade);
} //CascadeMyWindows
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
Form-Klasse
Form-Member
System.Windows.Forms-Namespace
MdiLayout