General information
Category:
Windows API functions
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only