ToolBarArray.GetIndex(ToolBar) 方法

定義

取得 ToolBarToolBarArray 的索引。Gets the index of a ToolBar in a ToolBarArray.

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

參數

o
ToolBar

控制項陣列中的 ToolBarA ToolBar in the control array.

傳回

Int16

Short,代表指定之 ToolBar 的索引。A Short that represents the index of the specified ToolBar.

備註

這個方法可以用來取得指定之的索引 ToolBarThis method can be used to retrieve the index for the specified ToolBar.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework 其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

適用於