FolderBrowserDialog: Remember last directory

  • Thread starter Thread starter Snozz
  • Start date Start date
S

Snozz

The SaveFileDialog remembers what directory a user last saved to, and
the next time it is displayed, it remembers this. The defaults for
restoredirectory and initialdirectory properties define this behavior.
FolderBrowserDialog has SelectedPath property for setting the initial
directory, but it doesn't remember the last directory selected between
application runs, only during the applications current lifetime. When
starting the app up, the first folderborwserdialog defaults to the
desktop. However, the SaveFileDialog remembers between application
runs.

How can I get the FolderBrowserDialog to remember between runs?
 
Snozz said:
The SaveFileDialog remembers what directory a user last saved to, and
the next time it is displayed, it remembers this. The defaults for
restoredirectory and initialdirectory properties define this behavior.
FolderBrowserDialog has SelectedPath property for setting the initial
directory, but it doesn't remember the last directory selected between
application runs, only during the applications current lifetime. When
starting the app up, the first folderborwserdialog defaults to the
desktop. However, the SaveFileDialog remembers between application
runs.

How can I get the FolderBrowserDialog to remember between runs?
You'll have to store your own setting.

Tom
 
Where does SaveFileDialog store its own memorization of the directory?
It's application specific, so I'm guessing maybe in the registry?
 
Snozz said:
Where does SaveFileDialog store its own memorization of the directory?
It's application specific, so I'm guessing maybe in the registry?

Yes.

For the FolderBrowserDialog, if using VB.Net, you can use My.Settings to store the location.

---------
- G Himangi, LogicNP Software http://www.ssware.com
Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder Browsing Functionality (.Net & ActiveX Editions).
EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and MFC/ATL/C++
EZShellExtensions: Develop all shell extensions,explorer bars and BHOs rapidly in .Net & MFC/ATL/C++
---------
 
Back
Top