DirListBox.DirListIndex 屬性

定義

取得或設定 DirListBox 控制項中目前選取項目的索引。

public:
 property int DirListIndex { int get(); void set(int value); };
[System.ComponentModel.Browsable(false)]
public int DirListIndex { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.DirListIndex : int with get, set
Public Property DirListIndex As Integer

屬性值

Integer,表示目前選取項目的索引。

屬性

備註

使用這個屬性可傳回目前選取之目錄的索引。 屬性DirListIndex可與和 DirListCount 屬性搭配DirList[]運作。

表達式 instance.DirList(instance.DirListIndex) 會傳回目前選取之目錄的字串。

注意

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

適用於

另請參閱