I'd like a SaveFileDialog with the following behavior:
The first time you open it, it goes to "My Documents".
Afterwards, it goes to the last selected folder.
What's the best way to accomplish this?
If I don't set the InitialDirectory, it goes to the exe's directory - which is not what I want. It rememebers the last selected directory though - even between executions.
If I set the InitialDirectory, it does not remember the last selected directory. Of course, I could save the last selected directory in the registry :( but I am looking for a better solution.
SaveFileDialog dialog = new SaveFileDialog();
//??? dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
dialog.ShowDialog();
Any advice?
question from:
https://stackoverflow.com/questions/1175242/setting-the-initial-directory-of-an-savefiledialog 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…