ListBoxItem Class

Represents an item in a ListBox or ComboBox control in an application that was upgraded from Visual Basic 6.0.

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

Public Class ListBoxItem
Dim instance As ListBoxItem

public class ListBoxItem
public class ListBoxItem
Not applicable.

In Visual Basic 6.0, the ListBox and ComboBox controls use a List property to store list items and an ItemData property to optionally store an Integer associated with each list item. In Visual Basic Code Name "Orcas", the ListBox and ComboBox controls use the Items property to store list items, and the ItemData property is no longer supported.

When a Visual Basic 6.0 application is upgraded to Visual Basic Code Name "Orcas", the upgrade tools create a ListBoxItem class for each item in a ListBox or ComboBox control. The SetItemData and GetItemData functions can then be used to enable any code that references the ItemData property.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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