Form.IsMdiContainer プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Form.IsMdiContainer プロパティの意味・解説 

Form.IsMdiContainer プロパティ

フォームマルチ ドキュメント インターフェイス (MDI: Multiple Document Interface) 子フォームコンテナかどうかを示す値を取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As Form
Dim value As Boolean

value = instance.IsMdiContainer

instance.IsMdiContainer = value
public bool IsMdiContainer { get;
 set; }
public:
property bool IsMdiContainer {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_IsMdiContainer ()

/** @property */
public void set_IsMdiContainer (boolean value)
public function get IsMdiContainer
 () : boolean

public function set IsMdiContainer
 (value : boolean)

プロパティ
フォームMDIフォームコンテナである場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

IsMdiContainer プロパティ使用してMDI フォームBackColor プロパティ変更するコード例次に示します。この例を実行するには、次のコード新しフォーム貼り付けます。

' Create a new form.
Dim mdiChildForm As New
 Form

Private Sub Form1_Load(ByVal
 sender As Object, _
    ByVal e As System.EventArgs) Handles
 MyBase.Load

    ' Set the IsMdiContainer property to true.
    IsMdiContainer = True

    ' Set the child form's MdiParent property to 
    ' the current form.
    mdiChildForm.MdiParent = Me

    'Call the method that changes the background color.
    SetBackGroundColorOfMDIForm()
End Sub

Private Sub SetBackGroundColorOfMDIForm()
    Dim ctl As Control

    ' Loop through controls,  
    ' looking for controls of MdiClient type. 
    For Each ctl In Me.Controls
        If TypeOf (ctl) Is
 MdiClient Then

            ' If the control is the correct type,
            ' change the color.
            ctl.BackColor = System.Drawing.Color.PaleGreen
        End If
    Next

End Sub
// Create a new form.
Form mdiChildForm = new Form();

private void Form1_Load(object sender, System.EventArgs
 e)
{

    // Set the IsMdiContainer property to true.
    IsMdiContainer = true;

    // Set the child form's MdiParent property to 
    // the current form.
    mdiChildForm.MdiParent = this;

    // Call the method that changes the background color.
    SetBackGroundColorOfMDIForm();
}

private void SetBackGroundColorOfMDIForm()
{
    foreach ( Control ctl in this.Controls
 )
    {
        if ((ctl) is MdiClient)

            // If the control is the correct type,
            // change the color.
        {
            ctl.BackColor = System.Drawing.Color.PaleGreen;
        }
    }

}
// Create a new form.
private Form mdiChildForm = new Form();

private void Form1_Load(Object sender, System.EventArgs
 e)
{
    // Set the IsMdiContainer property to true.
    set_IsMdiContainer(true);

    // Set the child form's MdiParent property to 
    // the current form.
    mdiChildForm.set_MdiParent(this);

    // Call the method that changes the background color.
    SetBackGroundColorOfMDIForm();
} //Form1_Load

private void SetBackGroundColorOfMDIForm()
{
    for (int iCtr = 0; iCtr < this.get_Controls().get_Count();
 iCtr++) {
        Control ctl = this.get_Controls().get_Item(iCtr);
        if (ctl instanceof MdiClient) {
            // If the control is the correct type,
            // change the color.
            ctl.set_BackColor(System.Drawing.Color.get_PaleGreen());
        }
    }
} //SetBackGroundColorOfMDIForm
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からForm.IsMdiContainer プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からForm.IsMdiContainer プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からForm.IsMdiContainer プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Form.IsMdiContainer プロパティ」の関連用語

Form.IsMdiContainer プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Form.IsMdiContainer プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS