コントロール コレクション内の指定したコントロールのインデックスを取得します。
Public Function IndexOf( _
ByVal control As Control _) As Integer
[C#]
public int IndexOf(Controlcontrol);
[C++]
public: int IndexOf(Control* control);
[JScript]
public function IndexOf(
control : Control) : int;
パラメータ
- control
コレクション内で検索する Control 。
戻り値
Control.ControlCollection 内の指定した Control の位置を表す 0 から始まるインデックス値。
解説
コントロールがコレクション内で見つからない場合、 IndexOf メソッドの戻り値は -1 です。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
Control.ControlCollection クラス | Control.ControlCollection メンバ | System.Windows.Forms 名前空間