Edit

Share via


ListBoxItem Class

Definition

Caution

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

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

public ref class ListBoxItem
public class ListBoxItem
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public class ListBoxItem
type ListBoxItem = class
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
type ListBoxItem = class
Public Class ListBoxItem
Inheritance
ListBoxItem
Attributes

Remarks

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, 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, 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.

Note

Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Constructors

ListBoxItem(String)

Initializes an instance of the ListBoxItem class.

ListBoxItem(String, Int32)

Initializes an instance of the ListBoxItem class.

Fields

ItemData

Stores the ItemData value for an item in a ListBox or ComboBox control in an application that was upgraded from Visual Basic 6.0.

ItemString

Stores the List value for an item in a ListBox or ComboBox control in an application that was upgraded from Visual Basic 6.0.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Converts a ListBoxItem to a String.

Applies to