Control.Select メソッド

コントロールをアクティブにします。

オーバーロードの一覧

コントロールをアクティブにします。

[Visual Basic] Overloads Public Sub Select()

[C#] public void Select();

[C++] public: void Select();

[JScript] public function Select();

子コントロールをアクティブにします。オプションとして、タブ オーダーでコントロールを選択するときの方向を指定します。

[Visual Basic] Overloads Protected Overridable Sub Select(Boolean, Boolean)

[C#] protected virtual void Select(bool, bool);

[C++] protected: virtual void Select(bool, bool);

[JScript] protected function Select(Boolean, Boolean);

使用例

[Visual Basic, C#, C++] 指定した Control が選択可能である場合に、そのコントロールを選択する例を次に示します。

[Visual Basic, C#, C++] メモ   ここでは、Select のオーバーロード形式のうちの 1 つだけについて、使用例を示します。その他の例については、各オーバーロード形式のトピックを参照してください。

 
Public Sub ControlSelect(control As Control)
   ' Select the control, if it can be selected.
   If control.CanSelect Then
      control.Select()
   End If
End Sub

[C#] 
public void ControlSelect(Control control)
{
   // Select the control, if it can be selected.
   if(control.CanSelect)
   {
      control.Select();
   }
}

[C++] 
public:
   void ControlSelect(Control* control) {
      // Select the control, if it can be selected.
      if (control->CanSelect) {
         control->Select();
      }
   }

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

参照

Control クラス | Control メンバ | System.Windows.Forms 名前空間