WebBrowserArray.SetIndex(WebBrowser, Int16) 方法

定義

設定 WebBrowser 中初始 WebBrowserArray 的索引。Sets the index of the initial WebBrowser in a WebBrowserArray.

public:
 void SetIndex(System::Windows::Forms::WebBrowser ^ o, short Index);
public void SetIndex (System.Windows.Forms.WebBrowser o, short Index);
member this.SetIndex : System.Windows.Forms.WebBrowser * int16 -> unit
Public Sub SetIndex (o As WebBrowser, Index As Short)

參數

o
WebBrowser

控制項陣列中的 WebBrowserA WebBrowser in the control array.

Index
Int16

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

備註

只有當您在控制項陣列中建立初始元素時,才應該呼叫 SetIndex 方法。The SetIndex method should only be called when you are creating the initial element in the control array. 若要加入後續的元素,請呼叫 Load 方法,並指定 IndexTo add subsequent elements, call the Load method and specify the Index.

注意

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.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.

適用於