<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > Common Dialogs > Dialog_SaveFile |
Description
Open common save file dialog.
Syntax
sFile = Dialog_SaveFile(hwnd, Caption, DefaultDirectory, FileFilter, DefaultExtension, Options)
Returns
String.
Parameters
Name |
Type |
Optional |
Meaning |
hwnd |
Number |
No |
Handle of the dialog containing the control |
Caption |
String |
No |
Dialog caption |
DefaultDirectory |
String |
No |
Default starting dialog directory (plus optional file name) If this parameter contains also a file name, it will be used as default suggested file name in the dialog |
FileFilter |
String |
No |
String expression representing file filters |
DafaultExtension |
String |
No |
Default extension to use |
Options |
Number |
No |
Remarks
Restrictions
See also
Examples
USES "UI"
USES "File"
DIM sFile AS STRING
DIM sFilter AS STRING
sFilter = "thinBasic Files (*.tBasic, *.tBasicc)|*.tBasic;*.tBasicc|"
sFilter += "Basic Files (*.BAS, *.INC)|*.BAS;*.INC|"
sFilter += "Resource Files (*.RC)|*.RC|"
sFilter += "Help files (*.HLP)|*.HLP|"
sFilter += "Text Files (*.TXT)|*.TXT|"
sFilter += "Word processing (*.RTF)|*.RTF|"
sFilter += "All Files (*.*)|*.*"
sFile = Dialog_SaveFile(0, _
"Save file as ...", _
DIR_GetCurrent, _
sFilter, _
"tBasic", _
%OFN_HIDEREADONLY or %OFN_ENABLESIZING)
MSGBOX 0, sFile