Support.GetItemData(Control, Int32) 方法

定義

警告

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

取得與 ListBoxComboBox 項目相關聯的 Integer

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

參數

Control
Control

ListBoxComboBox 控制項。

Index
Int32

Integer,代表 ListBoxItem 的索引。

傳回

與指定 Integer 相關聯的 ListBoxItem

屬性

備註

在 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 實作有顯著差異時,才會需要這些函式和物件。

適用於