Share via


ListBoxItem 類別

定義

警告

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

表示 ListBoxComboBox 控制項中的項目,該控制項位於已從 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
繼承
ListBoxItem
屬性

備註

在 Visual Basic 6.0 中 ListBox ,和 ComboBox 控件會使用 List 屬性來儲存清單專案,以及 ItemData 選擇性地儲存 Integer 與每個清單專案相關聯的屬性。 在 Visual Basic 中 ListBox ,和 ComboBox 控制項會 Items 使用 屬性來儲存清單專案,而且 ItemData 不再支援 屬性。

當 Visual Basic 6.0 應用程式升級至 Visual Basic 時,升級工具會為 或 ComboBox 控件中的每個ListBox專案建立ListBoxItem類別。 SetItemData然後,可以使用 和 GetItemData 函式來啟用任何參考 屬性的程序ItemData代碼。

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic 2008。 在大多數情況下,這些函式和物件會複製在 .NET Framework 其他命名空間中可以找到的功能。 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。

建構函式

ListBoxItem(String)
已淘汰.

初始化 ListBoxItem 類別的執行個體。

ListBoxItem(String, Int32)
已淘汰.

初始化 ListBoxItem 類別的執行個體。

欄位

ItemData
已淘汰.

儲存 ListBoxComboBox 控制項中項目的 ItemData 值,該控制項位於已從 Visual Basic 6.0 升級的應用程式中。

ItemString
已淘汰.

儲存 ListBoxComboBox 控制項中項目的 List 值,該控制項位於已從 Visual Basic 6.0 升級的應用程式中。

方法

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()
已淘汰.

ListBoxItem 轉換成 String

適用於