Dan
2009-12-01 22:26:37 UTC
The OpenFileDialog in .NET has the side effect of remembering the
folder from it last use, such that the next time an OpenFileDialog is
used, it will default to the prior used folder by default.
I would like to use OpenFileDialog without this feature ... so I need
to figure out where OpenFileDialog is reading the last used folder
setting.
A few older posts directed me to the registry, I tried saving and
restoring values under CurrentUser\Software\Microsoft\Windows
\CurrentVersion\Explorer\ComDlg32 but this did not work.
I also tried working with the Environment.CurrentDirectory variable
only to discover that the OpenFileDialog is getting its default value
somewhere else.
Does anyone know where to find the default folder value that
OpenFileDialog uses by default?
Thanks,
Dan
folder from it last use, such that the next time an OpenFileDialog is
used, it will default to the prior used folder by default.
I would like to use OpenFileDialog without this feature ... so I need
to figure out where OpenFileDialog is reading the last used folder
setting.
A few older posts directed me to the registry, I tried saving and
restoring values under CurrentUser\Software\Microsoft\Windows
\CurrentVersion\Explorer\ComDlg32 but this did not work.
I also tried working with the Environment.CurrentDirectory variable
only to discover that the OpenFileDialog is getting its default value
somewhere else.
Does anyone know where to find the default folder value that
OpenFileDialog uses by default?
Thanks,
Dan