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

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

Control.CanSelect プロパティ

コントロールを選択できるかどうかを示す値を取得します。

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

解説解説

System.Windows.Forms.ControlStyles の Selectable 値が true に設定されていて、別のコントロールに含まれており、コントロール自体とすべての親コントロールが表示されていて有効である場合、このプロパティは true を返します。

CanSelect プロパティに対して false の値を返す、選択できない Windows フォーム コントロールの一覧を次に示します。これらのコントロールから派生したコントロールも、選択できません。

使用例使用例

指定した Control が選択可能である場合に、そのコントロールを選択するコード例を次に示します。

Public Sub ControlSelect(control As
 Control)
   ' Select the control, if it can be selected.
   If control.CanSelect Then
      control.Select()
   End If
End Sub
public void ControlSelect(Control control)
{
   // Select the control, if it can be selected.
   if(control.CanSelect)
   {
      control.Select();
   }
}
public:
   void ControlSelect( Control^ control )
   {
      
      // Select the control, if it can be selected.
      if ( control->CanSelect )
      {
         control->Select(  );
      }
   }
public void ControlSelect(Control control)
{
    // Select the control, if it can be selected.
    if (control.get_CanSelect()) {
        control.Select();
    }
} //ControlSelect
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



Control.CanSelect プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS