On Fri, 09 May 2008 12:45:02 -0700,
je**********@gm ail.com
<je**********@g mail.comwrote:
Hello:
Correct me if I'm wrong, but it appears that saving a file with the
SaveFileDialog changes the Environment.Cur rentDirectory property.
How can I prevent this?
This has been answered before:
http://groups.google.com/groups/sear...ry&qt_s=Search
In some of the top threads related to that search, you'll find mention
that the FileDialog.Rest oreDirectory property controls this behavior.
Of course, I suppose you could have also just looked at the documentation
for the SaveFileDialog. IMHO, the first thing anyone should do when they
are trying to find the answer to a question related to the use of a
particular framework class is read through the entire list of public
members of the class in question. Often what you're looking for will be
found there. :)
If you look through the previous threads that Google shows you, you will
also see good advice that generally you should not be relying on the
current directory anyway. Sometimes when dealing with legacy code it's
safer to just not change the current directory. But it's usually better
to just use full path names when referencing the file system. Then you're
not dependent on side-effects of other code and/or use actions.
Pete