BaseControlArray.Unload(Int16) 方法

定義

從控制項陣列中移除控制項。Removes a control from a control array.

public:
 void Unload(short Index);
public void Unload (short Index);
member this.Unload : int16 -> unit
Public Sub Unload (Index As Short)

參數

Index
Int16

Short,表示要移除控制項的索引。A Short that represents the index of the control to remove.

備註

這個方法相當於用於動態移除控制項陣列元素的 Visual Basic 6.0 Unload 函式。This method is the equivalent of the Visual Basic 6.0 Unload function for dynamically removing a control array element.

注意

只有使用 Load 方法動態加入的控制項,才可以從控制項陣列中移除。Only controls that were added dynamically by using the Load method can be removed from the control array.

對升級自 Visual Basic 6.0 之應用程式中使用的所有控制項陣列而言,BaseControlArray 是基底類別。The BaseControlArray class is the base class for all control arrays that are used in applications upgraded from Visual Basic 6.0.

注意

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.

適用於