打開文本框
控件:OpenFileDialog
代碼:
- OpenFileDialog1.InitialDirectory = Application.ExecutablePath '初始目錄為應用程式的可執行路徑,
- OpenFileDialog1.DefaultExt = ".doc" '指定預設類型
- OpenFileDialog1.Filter = "文本型|*.txt|文檔型|*.doc|所有檔案|*.*"
- OpenFileDialog1.ShowDialog()
儲存文本框
控件: SaveFileDialg
注意:把CheckFileExists 和 CheckPathExists都設為true