|
|
Title | Use the OpenFileDialog control's RestoreDirectory property in VB .NET |
Description | This example shows how to use the OpenFileDialog control's RestoreDirectory property in VB .NET. |
Keywords | Access, image, picture, memo |
Categories | Controls, VB.NET |
|
|
When you use an OpenFileDialog and the user changes directories, the dialog changes the application's current directory. If you set the dialog's RestoreDirectory property to True, then the dialog resets the current directory to its original value when it closes. Note that the dialog still keeps the new directory as its starting point the next time you display it.
This example has two buttons that display different OpenFileDialogs, one with RestoreDirectory = True and one with RestoreDirectory = False. Click the buttons and navigate to different directories. When you close the dialogs, the program displays its current directory so you can see the difference.
|
|
|
|
|
|