Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleUse the OpenFileDialog control's RestoreDirectory property in VB .NET
DescriptionThis example shows how to use the OpenFileDialog control's RestoreDirectory property in VB .NET.
KeywordsAccess, image, picture, memo
CategoriesControls, 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.

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated