ButtonArray.GetIndex(Button) 方法

定義

得到 a ButtonButtonArray中 的索引。

public:
 short GetIndex(System::Windows::Forms::Button ^ o);
public short GetIndex(System.Windows.Forms.Button o);
member this.GetIndex : System.Windows.Forms.Button -> int16
Public Function GetIndex (o As Button) As Short

參數

o
Button

控制陣列中的A Button

傳回

A Short 代表指定 Button的索引。

備註

此方法可用於取得或 CancelButton的索引AcceptButton

Note

命名空間中的 Microsoft.VisualBasic.Compatibility.VB6 函式與物件提供給從 Visual Basic 6.0 升級到 Visual Basic 的工具使用。 大多數情況下,這些函式和物件會重複你在 .NET Framework 中其他命名空間中能找到的功能。 只有當 Visual Basic 6.0 的程式碼模型與 .NET Framework 實作有顯著差異時,才需要使用這些工具。

適用於