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

設定 ItemData 屬性 。ListBoxItem

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

A ListBoxComboBox 控制。

Index
Int32

IndexListBoxItem

ItemData
Int32

Integer並指派給該ItemData物業。

屬性

備註

在 Visual Basic 6.0 中,設計時可在 Properties 視窗中設定 ListBoxComboBox 控制的 ItemData 屬性,將 IntegerListBoxComboBox 項目關聯起來。 在 Visual Basic 中,ItemData 性質已不復存在;可以使用 GetItemDataSetItemData 方法來模擬 ItemData 的行為。

Note

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

適用於