> Regardless, your tip will work great for me. I suppose if I want to
> persist
> this directory between instances of my app I'll need to write it out to
> the Registry or something.
Ok,
Maybe this won't work so well for me. Environment.CurrentDirectory is only
updated after the dialog is shown once; then it contains the last dir used
by the dialog. Before that, it contains the dir from which the process was
started. However, when the dialog is shown, it opens to the correct dir
(the last one used, even between instances of the app) regardless.
So where does the dialog persist this information? It can't be using
CurrentDirectory, since it doesn't contain the correct information; it must
be stored somewhere else. I'd like to be able to get the info right from
the source.
Any ideas?
Keith
Oliver Sturm - 09 Aug 2005 10:30 GMT
> So where does the dialog persist this information? It can't be using
> CurrentDirectory, since it doesn't contain the correct information; it must
> be stored somewhere else. I'd like to be able to get the info right from
> the source.
There's a registry key at
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32,
which is used for this purpose. Maybe it's documented somewhere, but
I've never tried to read and parse this information. It's categorized by
file type, so it might not be that useful to your own application -
maybe it would be better if you just stored away your own last path and
set it again on restart.
Oliver Sturm

Signature
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog
Keith - 09 Aug 2005 16:55 GMT
Oliver,
Thanks for all the suggestions!
K
>> So where does the dialog persist this information? It can't be using
>> CurrentDirectory, since it doesn't contain the correct information; it
[quoted text clipped - 10 lines]
>
> Oliver Sturm