ListBoxItem Constructors

Definition

Initializes an instance of the ListBoxItem class.

Overloads

ListBoxItem(String)

Initializes an instance of the ListBoxItem class.

ListBoxItem(String, Int32)

Initializes an instance of the ListBoxItem class.

ListBoxItem(String)

Initializes an instance of the ListBoxItem class.

public:
 ListBoxItem(System::String ^ ItemString);
public ListBoxItem (string ItemString);
new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem : string -> Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem
Public Sub New (ItemString As String)

Parameters

ItemString
String

A String that contains the list item.

Remarks

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.

Applies to

ListBoxItem(String, Int32)

Initializes an instance of the ListBoxItem class.

public:
 ListBoxItem(System::String ^ ItemString, int ItemData);
public ListBoxItem (string ItemString, int ItemData);
new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem : string * int -> Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem
Public Sub New (ItemString As String, ItemData As Integer)

Parameters

ItemString
String

A String that contains the list item.

ItemData
Int32

An Integer that represents the Visual Basic 6.0 ItemData value.

Remarks

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.

Applies to