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

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

Form.ActiveMdiChild プロパティ

現在アクティブマルチ ドキュメント インターフェイス (MDI) 子ウィンドウ取得します

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

Dim instance As Form
Dim value As Form

value = instance.ActiveMdiChild
public Form ActiveMdiChild { get; }
public:
property Form^ ActiveMdiChild {
    Form^ get ();
}
/** @property */
public Form get_ActiveMdiChild ()
public function get ActiveMdiChild
 () : Form

プロパティ
現在アクティブMDIウィンドウを表す Form返します。子ウィンドウが現在存在しない場合null 参照 (Visual Basic では Nothing) を返します

解説解説
使用例使用例

アクティブMDIフォームへの参照取得してフォーム上のすべての TextBox コントロールループ処理しそれぞれの Text プロパティリセットするコード例次に示します。この例では、MDIフォーム作成済みであること、およびこのメソッドがその MDIフォームから呼び出されていることを前提にしています。

Public Sub ClearAllChildFormText()
    ' Obtain a reference to the currently active MDI child form.
    Dim tempChild As Form = Me.ActiveMdiChild
    
    ' Loop through all controls on the child form.
    Dim i As Integer
    For i = 0 To tempChild.Controls.Count -
 1
        ' Determine if the current control on the child form is a TextBox.
        If TypeOf tempChild.Controls(i) Is
 TextBox Then
            ' Clear the contents of the control since it is a TextBox.
            tempChild.Controls(i).Text = ""
        End If
    Next i
End Sub 'ClearAllChildFormText
public void ClearAllChildFormText()
 {
    // Obtain a reference to the currently active MDI child form.
    Form tempChild = this.ActiveMdiChild;
    
    // Loop through all controls on the child form.
    for (int i = 0; i < tempChild.Controls.Count;
 i++)
    {
       // Determine if the current control on the child form is a TextBox.
       if (tempChild.Controls[i] is TextBox)
       {
          // Clear the contents of the control since it is a TextBox.
          tempChild.Controls[i].Text = "";
       }
    }
 }
    
public:
   void ClearAllChildFormText()
   {
      
      // Obtain a reference to the currently active MDI child form.
      Form^ tempChild = this->ActiveMdiChild;
      
      // Loop through all controls on the child form.
      for ( int i = 0; i < tempChild->Controls->Count;
 i++ )
      {
         
         // Determine if the current control on the child form is a
 TextBox.
         if ( dynamic_cast<TextBox^>(tempChild->Controls[
 i ]) )
         {
            
            // Clear the contents of the control since it is a TextBox.
            tempChild->Controls[ i ]->Text = "";
         }

      }
   }

public void ClearAllChildFormText()
{
    // Obtain a reference to the currently active MDI child form.
    Form tempChild = this.get_ActiveMdiChild();

    // Loop through all controls on the child form.
    for (int i = 0; i < tempChild.get_Controls().get_Count();
 i++) {
        // Determine if the current control on the child form is a 
        // TextBox.
        if (tempChild.get_Controls().get_Item(i) instanceof TextBox)
 {
            // Clear the contents of the control since it is a TextBox.
            tempChild.get_Controls().get_Item(i).set_Text("");
        }
    }
} //ClearAllChildFormText
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS