Support.GetItemData(Control, Int32) 方法

定义

注意

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

获取与某个或Integer项关联的项。ListBoxComboBox

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

A ListBoxComboBox 控件。

Index
Int32

一个 Integer ,表示 . 的 ListBoxItem索引。

返回

Integer 指定的 ListBoxItem.

属性

注解

在 Visual Basic 6.0 中, 控件的 属性可以在 Properties 窗口,用于将 项相关联。 在 Visual Basic 中,ItemData 属性不再存在;GetItemDataSetItemData 方法可用于模拟 ItemData 的行为。

注释

Microsoft.VisualBasic.Compatibility.VB6 命名空间中的函数和对象由用于从 Visual Basic 6.0 升级到 Visual Basic 2008 的工具使用。 在大多数情况下,这些函数和对象重复了可在 .NET Framework 中的其他命名空间中找到的功能。 仅当 Visual Basic 6.0 代码模型与 .NET Framework 实现明显不同时,它们才是必需的。

适用于