ToolBarArray.Item[Int16] 屬性

定義

依索引取得 ToolBarArray 的特定項目。Gets a specific element of a ToolBarArray by index. 唯讀。Read-only.

public:
 property System::Windows::Forms::ToolBar ^ default[short] { System::Windows::Forms::ToolBar ^ get(short Index); };
public System.Windows.Forms.ToolBar this[short Index] { get; }
member this.Item(int16) : System.Windows.Forms.ToolBar
Default Public ReadOnly Property Item(Index As Short) As ToolBar

參數

Index
Int16

Short,指定控制項陣列中某項目的位置。A Short that specifies the position of an element of the control array.

屬性值

ToolBar

ToolBar,位於控制項陣列中的指定 IndexA ToolBar at the specified Index in the control array.

備註

Item屬性是控制項陣列的預設屬性。The Item property is the default property for a control array. 因此,下列程式程式碼是相等的。Therefore, the following lines of code are equivalent.

MsgBox(CStr(ToolBarArray.Item(1).Text))  
MsgBox(CStr(ToolBarArray(1).Text))  

注意

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.

適用於