Hi Martin,
You first need to define this constant. You can do it by including
this code (see section "8.5.2. Constants for file and folder dialogs
and ShellExecute" of the help file):
// Windows Comm dialog flags for file open/save.
// More information is available here:
//
http://msdn.microsoft.com/en-us/library/ms646839.aspx
var OFN_READONLY = 0x00000001;
var OFN_OVERWRITEPROMPT = 0x00000002;
var OFN_HIDEREADONLY = 0x00000004;
var OFN_NOCHANGEDIR = 0x00000008;
var OFN_SHOWHELP = 0x00000010;
var OFN_ENABLEHOOK = 0x00000020;
var OFN_ENABLETEMPLATE = 0x00000040;
var OFN_ENABLETEMPLATEHANDLE = 0x00000080;
var OFN_NOVALIDATE = 0x00000100;
var OFN_ALLOWMULTISELECT = 0x00000200;
var OFN_EXTENSIONDIFFERENT = 0x00000400;
var OFN_PATHMUSTEXIST = 0x00000800;
var OFN_FILEMUSTEXIST = 0x00001000;
var OFN_CREATEPROMPT = 0x00002000;
var OFN_SHAREAWARE = 0x00004000;
var OFN_NOREADONLYRETURN = 0x00008000;
var OFN_NOTESTFILECREATE = 0x00010000;
var OFN_NONETWORKBUTTON = 0x00020000;
var OFN_NOLONGNAMES = 0x00040000;
var OFN_EXPLORER = 0x00080000;
var OFN_NODEREFERENCELINKS = 0x00100000;
var OFN_LONGNAMES = 0x00200000;
var OFN_ENABLEINCLUDENOTIFY = 0x00400000;
var OFN_ENABLESIZING = 0x00800000;
var OFN_DONTADDTORECENT = 0x02000000;
var OFN_FORCESHOWHIDDEN = 0x10000000;
// Windows shell SHBrowseForFolder flags
// More information is available here:
//
http://msdn.microsoft.com/en-us/library/bb773205.aspx
var BIF_RETURNONLYFSDIRS = 0x0001;
var BIF_DONTGOBELOWDOMAIN = 0x0002;
var BIF_STATUSTEXT = 0x0004;
var BIF_RETURNFSANCESTORS = 0x0008;
var BIF_EDITBOX = 0x0010;
var BIF_VALIDATE = 0x0020;
var BIF_NEWDIALOGSTYLE = 0x0040;
var BIF_BROWSEINCLUDEURLS = 0x0080;
var BIF_UAHINT = 0x0100;
var BIF_NONEWFOLDERBUTTON = 0x0200;
var BIF_NOTRANSLATETARGETS = 0x0400;
var BIF_BROWSEFORCOMPUTER = 0x1000;
var BIF_BROWSEFORPRINTER = 0x2000;
var BIF_BROWSEINCLUDEFILES = 0x4000;
var BIF_SHAREABLE = 0x8000;
var BIF_USENEWUI = (BIF_NEWDIALOGSTYLE | BIF_EDITBOX);
// Windows ShowWindow constants.
// Also used in other functions like ShellExecute.
// More information is available here:
//
http://msdn.microsoft.com/en-us/library/ms633548.aspx
var SW_HIDE = 0;
var SW_SHOWNORMAL = 1;
var SW_NORMAL = 1;
var SW_SHOWMINIMIZED = 2;
var SW_SHOWMAXIMIZED = 3;
var SW_MAXIMIZE = 3;
var SW_SHOWNOACTIVATE = 4;
var SW_SHOW = 5;
var SW_MINIMIZE = 6;
var SW_SHOWMINNOACTIVE = 7;
var SW_SHOWNA = 8;
var SW_RESTORE = 9;
var SW_SHOWDEFAULT = 10;
var SW_FORCEMINIMIZE = 11;