How To: Opt Out of File Dialog Box Automatic Upgrade

When the OpenFileDialog and SaveFileDialog classes are used in an application, their appearance and behavior depend on the version of Windows the application is running on. When an application that was created on the .NET Framework 2.0 or earlier is displayed on Windows Vista, OpenFileDialog and SaveFileDialog are automatically displayed with the Windows Vista appearance and behavior. Starting in the .NET Framework 3.0, you can opt out of the automatic upgrade to display the OpenFileDialog and SaveFileDialog with a Windows XP-style appearance and behavior.

To opt out of file dialog box automatic upgrade

  1. Set the AutoUpgradeEnabled property of OpenFileDialog or SaveFileDialog to false before you display the dialog box.

See also