KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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?
Tags (comma-separated)
Save Edits
Cancel