Dmitrii Erokhin
Dmitrii Erokhin

Reputation: 1347

OpenFileDialog.FileFilter strange behaviour

In my app I have an OpenFileDialog with a filter like this: Image Files|*.bmp;*.png;*.gif|All Files|*.*. On my machine the filter in the dialog is displayed as it should be:

Image Files
All Files

But on my boss's machine the filter in the dialog looks like this:

Image Files (*.bmp, *.png, *.gif)
All Files (*.*)

I don't have a single line of code which may change the filter, so I do not understand, why on earth it is displayed this way. What's even more strange is that when I logged into my boss's computer under my account and ran just the same .exe my boss tried it worked like a charm!

Both my and my boss's machine run Windows 7 Enterprise.

Upvotes: 2

Views: 136

Answers (1)

Jeff Yates
Jeff Yates

Reputation: 62377

My guess is your Windows Explorer settings specify to hide file extensions on your machine, whereas your boss's is configured to show them.

To check this setting:

  1. Open Windows Explorer
  2. Click the Organize dropdown
  3. Select Folder and Search Options
  4. Select the View tab
  5. Look at the list of check boxes under Advanced settings and find Hide extensions for known file types

Upvotes: 1

Related Questions