Navigation: thinBasic Modules > UI (User Interface) > Common Dialogs > Dialog_OpenFile |
|
Description
Open common open file dialog.
Syntax
sFile = Dialog_OpenFile(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 |
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_OpenFile(0, _
"Open a file", _
DIR_GetCurrent, _
sFilter, _
"tBasic", _
%OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY or %OFN_ENABLESIZING)
MSGBOX 0, sFile
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |