Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp2c32 GetOpenFileName
Message
From
26/05/2018 10:31:45
 
 
To
25/05/2018 17:17:11
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2016
Miscellaneous
Thread ID:
01660379
Message ID:
01660385
Views:
149
unless you are in the root of a drive, "." and ".." files should always exist, making file name moot

>Is there a method or property to set so the getopenfilename will not remember where the last file was selected from and always use the cIntialDirectory parameter I pass to it?
>I really would like it to always default to the folder I pass it via the cIntialDirectory and not use the folder where a file was last selected.
>
>I found a work around and that was to set the file name to the cintialdirectory\filename, but really we don't know the exact file name the client is using.
>
>Thanks in Advance
>
>Chad Newman
>
>The initial directory. The algorithm for selecting the initial directory varies on different platforms.
>
>Windows 7:
>If cInitialDirectory has the same value as was passed the first time the application used an Open or Save As dialog box, the path most recently selected by the user is used as the initial directory.
>Otherwise, if cFileName contains a path, that path is the initial directory.
>Otherwise, if cInitialDirectory is not empty, it specifies the initial directory.
>If cInitialDirectory is empty and the current directory contains any files of the specified filter types, the initial directory is the current directory.
>Otherwise, the initial directory is the personal files directory of the current user.
>Otherwise, the initial directory is the Desktop folder.
>
>Windows 2000/XP/Vista:
>If cFileName contains a path, that path is the initial directory.
>Otherwise, cInitialDirectory specifies the initial directory.
>Otherwise, if the application has used an Open or Save As dialog box in the past, the path most recently used is selected as the initial directory. However, if an application is not run for a long time, its saved selected path is discarded.
>If cInitialDirectory is empty and the current directory contains any files of the specified filter types, the initial directory is the current directory.
>Otherwise, the initial directory is the personal files directory of the current user.
>Otherwise, the initial directory is the Desktop folder.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform