Export (0) Print
Expand All

Support.GetItemData Method

Gets an Integer associated with a ListBox or ComboBox item.

Namespace: Microsoft.VisualBasic.Compatibility.VB6
Assembly: Microsoft.VisualBasic.Compatibility (in microsoft.visualbasic.compatibility.dll)

public static int GetItemData (
	Control Control,
	int Index
)
public static int GetItemData (
	Control Control, 
	int Index
)
public static function GetItemData (
	Control : Control, 
	Index : int
) : int
Not applicable.

Parameters

Control

A ListBox or ComboBox control.

Index

An Integer that represents the index of the ListBoxItem.

Return Value

The Integer associated with the specified ListBoxItem.

In Visual Basic 6.0, the ItemData property for a ListBox or ComboBox control could be set at design time in the Properties window to associate an Integer with a ListBox or ComboBox item. In Visual Basic Code Name "Orcas", the ItemData property no longer exists; the GetItemData and SetItemData methods can be used to emulate the behavior of ItemData.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft