Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:22:18+00:00 2026-06-10T03:22:18+00:00

According to this msdn article one of the sources for InitialDirectory property used in

  • 0

According to this msdn article one of the sources for InitialDirectory property used in FileDialog is:

A path that was previously used in the program, perhaps retained from the last directory or file operation.

…

So if you selected your first file from folder x, the next time you try to select a file it will open up the FileDialog with with folder x selected (saving you having to navigate there).

Playing around with notepad this seems to carry across opening a file, saving a file, opening a file and even when printing with "Microsoft XPS Document Writer" which brings up it’s own dialog.

So my question is where is this value stored between dialogs? I would like to be able to see what it is and potentially change it? The specific area i would like to change it is in the "Microsoft XPS Document Writer" printer which brings up it’s own dialog. So it’s not as simple as just setting the initalDirectory Value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:22:20+00:00Added an answer on June 10, 2026 at 3:22 am

    You should take a look at this link:
    MRU locations are what you are looking at!

    Here’s a way for accessing it:

    var openFileDialog1 = new OpenFileDialog();
    string path = openFileDialog1.InitialDirectory;
    // you can change path if you want
    openFileDialog1.InitialDirectory = path;
    // after you are donw you can display you dialog
    if (openFileDialog1.ShowDialog() == DialogResult.OK)
    {
          // do something
    }
    

    Another way is to use Directory.SetCurrentDirectory method which sets the application’s current working directory

    And from Microsoft website, it is stored at this location in the registry:

    //The MRU lists for Windows Explorer-style dialog boxes are stored by file type for each user in the following registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU
    

    hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this MSDN article : The optional time zone indicator, Z, is used
According this MSDN article HttpApplication .EndRequest can be used to close or dispose of
According to this MSDN article , you should not catch general exceptions. I'm sure
According to this MSDN article about medium trust , under medium-trust: FileIOPermission is restricted.
According to this article from msdn ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms740496(v=vs.85).aspx ) the struct varies depending on
I implement this function : GetSystemPowerStatusEx & GetSystemPowerStatusEx2 according to this article on MSDN
According to this article, http://msdn.microsoft.com/en-us/library/ms177197.aspx on MSDN, we should release the unmanaged resources in
According to this page in MSDN, turns out that the accessibility of a specific
according to this MSDN article , there should be an Application Bar template in
According this article , generic JPA DAO(Data Access Object) is a pretty nice pattern.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.