Form.LayoutMdi(MdiLayout) Form.LayoutMdi(MdiLayout) Form.LayoutMdi(MdiLayout) Form.LayoutMdi(MdiLayout) Method

定義

マルチ ドキュメント インターフェイス (MDI) 親フォーム内に MDI 子フォームを配置します。Arranges the multiple-document interface (MDI) child forms within the MDI parent form.

public:
 void LayoutMdi(System::Windows::Forms::MdiLayout value);
public void LayoutMdi (System.Windows.Forms.MdiLayout value);
member this.LayoutMdi : System.Windows.Forms.MdiLayout -> unit
Public Sub LayoutMdi (value As MdiLayout)

パラメーター

value
MdiLayout MdiLayout MdiLayout MdiLayout

MDI 子フォームのレイアウトを定義する MdiLayout 値の 1 つ。One of the MdiLayout values that defines the layout of MDI child forms.

次の例は、MDI アプリケーションの親フォームにあるウィンドウメニューのメニュー項目のイベントハンドラーを示しています。The following example shows the event handlers for the menu items of a Window menu in an MDI application's parent form. 各イベントハンドラーは LayoutMdi メソッドを呼び出し、アプリケーションで現在開いているすべての子フォームを配置します。Each event handler makes calls to the LayoutMdi method to arrange any child forms that are currently open in the application.

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 );
   }
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 Sub HorizontallyTileMyWindows(sender As Object, e As System.EventArgs)
    ' Tile all child forms horizontally.
    Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub


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


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

注釈

このメソッドを使用して、mdi 子フォームのナビゲーションと操作を簡単に行えるように、mdi 親フォームに MDI 子フォームを配置できます。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 子フォームは、水平方向、垂直方向、カスケード形式、または MDI 親フォーム内のアイコンとして並べて表示できます。MDI child forms can be tiled horizontally and vertically, cascaded, or as icons within the MDI parent form.

適用対象

こちらもご覧ください