FileListBox.Pattern 屬性

定義

取得或設定一個值,表示執行時控制項中顯示 FileListBox 的檔案名稱。

public:
 property System::String ^ Pattern { System::String ^ get(); void set(System::String ^ value); };
public string Pattern { get; set; }
member this.Pattern : string with get, set
Public Property Pattern As String

屬性值

一個表示檔案規範的字串表達式,例如 “*.*” 或 “*.FRM」。 預設為「*.*」,會回傳所有檔案的清單。

備註

Pattern 特性在設計應用程式的檔案瀏覽與操作能力中扮演關鍵角色。 結合其他檔案控制屬性使用 Pattern ,讓使用者有方式探索檔案或相似檔案群組。 例如,在專門用於啟動其他程式的應用程式中,你可以指定檔案清單框中只顯示 .exe 檔案(*.exe)。

除了使用萬用字元外,你也可以使用多個圖案,中間有分號(;)。 例如,「*.exe;*.bat“會回傳所有可執行檔案及所有 MS-DOS 批次檔案的清單。

改變房產價值 Pattern 會產生事件 PatternChange

Note

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

適用於

另請參閱