开发者

OpenFileDialog.FileFilter strange behaviour

开发者 https://www.devze.com 2023-04-04 06:24 出处:网络
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:

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 (*.*开发者_如何学Python)

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.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号