DirListBox.Path 屬性

定義

取得或設定控制節點中的 DirListBox 當前路徑。

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

屬性值

A String 代表目前所選目錄的路徑。 當執行時建立控制項時,預設路徑是目前的路徑。

屬性

備註

在建構應用程式的檔案瀏覽與操作功能時,請使用此特性。 當你設定該屬性時 Path ,效果與 MS-DOS chdir 指令的效果相似;相對路徑可啟用,無論是否啟用磁碟機規格。 如果你只指定一個有冒號(:)的磁碟,會選擇該磁碟目前的目錄。

Path此屬性也可透過以下語法設定為無需硬碟連線的合格網路路徑:

\\servername\sharename\path

改變控制點的PathDirListBox值會產生事件Change

Note

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

適用於

另請參閱