Re: Open Dialog Intial Directory?
"Nassar, Anthony" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Or make the OpenFileDialog in question a static variable of the class. That's what I do. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Steve Abaffy Sent: Thursday, April 19, 2007 4:27 PM To: [email protected] Subject: [DOTNET-WINFORMS] Open Dialog Intial Directory? Hello, I'm sure this is easy, but I am having a brain fart or something. I have from which contains a OpenFileDialog box. I would like to figure out a way to save the last folder opened and save it somewhere so that the next time I open the FileDialog box I can set the InitialDirectory to that folder. This state does not have to span past the current use of the app. In other words open app, select thisform from main_menu. Open File Dialog, do something close thisform. Do something else in app, open thisform, Open File Dialog set intialDirectory to last used. The problem is by closing the thisform all the var in the form are lost and reinitialize to default. So not sure where to keep the information of lastFolderUsed. Thanks