Support.SetItemData(Control, Int32, Int32) 方法

定義

警告

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

設定 ItemDataListBoxItem 屬性。

public:
 static void SetItemData(System::Windows::Forms::Control ^ Control, int Index, int ItemData);
public static void SetItemData (System.Windows.Forms.Control Control, int Index, int ItemData);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static void SetItemData (System.Windows.Forms.Control Control, int Index, int ItemData);
static member SetItemData : System.Windows.Forms.Control * int * int -> unit
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member SetItemData : System.Windows.Forms.Control * int * int -> unit
Public Sub SetItemData (Control As Control, Index As Integer, ItemData As Integer)

參數

Control
Control

ListBoxComboBox 控制項。

Index
Int32

IndexListBoxItem

ItemData
Int32

要指派給 ItemData 屬性的 Integer

屬性

備註

在 Visual Basic 6.0ItemData屬性ListBoxComboBox無法在設計階段設定控制項屬性建立關聯的視窗Integer使用ListBoxComboBox項目。 在 Visual BasicItemData屬性已不存在GetItemDataSetItemData方法可用來模擬行為的ItemData

注意

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

適用於