Re: getOpenFileName()
- Posted by don cole <doncole at p?cbell?net> Jan 21, 2008
- 527 views
Greg Haberek wrote: > > don cole wrote: > > > > VOID=getOpenFileName() > > > > Always open in folder "Documents". > > > > How can I change this? > > You can pass a path to "file" parameter of the function: > > }}} <eucode> > VOID = getOpenFileName( 0, "C:\\WINDOWS\\system32\\", {"All Files", "*.*"} ) > </eucode> {{{ > > You *MUST* end the path in a backslash, else Windows will fill in the last > part > as the filename to choose. > > HTH, > > -Greg Thanks Greg and Mike777, Now a new problem had popped up. Here's my code:
filename = getOpenFileName( MainWin, -- parent window "H:\\", -- no default name {"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , -- rar files "All Files", "*.*" } ) -- everything else
It open in H: which is what I want but now all files show up in the openDialog box not just the .rar files? With my old code:
filename=getOpenFileName(0,"", {"Dialog Flags", {OFN_ALLOWMULTISELECT}, "Rar Files", "*.RAR" , -- rar files "All Files", "*.*" } ) -- everything else
only the .rar files showed up. Don Cole