FileListBox.Path 屬性

定義

取得或設定 的當前路徑。FileListBox

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

屬性值

String A 包含目前路徑,不包含檔名。

屬性

備註

Path 屬性的值是指示路徑的字串,例如 C:\Ob 或 C:\Windows\System。 對於 FileListBox 控制項,預設為執行時建立控制項時的當前路徑。

在建構應用程式的檔案瀏覽與操作功能時,請使用此特性。 設定該 Path 屬性的效果類似於 MS-DOS chdir 指令;允許有或無磁碟機規格的相對路徑。 僅指定帶有冒號的磁碟機(:) 會選擇該磁碟機目前的目錄。

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

\\servername\sharename\path

改變控制點的PathFileListBox值會產生事件PathChange

Note

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

適用於

另請參閱