共用方式為


Support.GetItemString(Control, Int32) 方法

定義

警告

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

取得與 StringListBox 項目相關聯的 ComboBox

public:
 static System::String ^ GetItemString(System::Windows::Forms::Control ^ Control, int Index);
public static string GetItemString (System.Windows.Forms.Control Control, int Index);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static string GetItemString (System.Windows.Forms.Control Control, int Index);
static member GetItemString : System.Windows.Forms.Control * int -> string
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member GetItemString : System.Windows.Forms.Control * int -> string
Public Function GetItemString (Control As Control, Index As Integer) As String

參數

Control
Control

ListBoxComboBox 控制項。

Index
Int32

Integer,代表 ListBoxItem 的索引。

傳回

與指定 String 相關聯的 ListBoxItem

屬性

備註

升級工具會使用此函式來模擬 Visual Basic 6.0List屬性。 在 Visual Basic 中使用ItemsItems屬性改為。

注意

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

適用於