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:
- Open Windows Explorer
- Click the Organize dropdown
- Select Folder and Search Options
- Select the View tab
- Look at the list of check boxes under Advanced settings and find Hide extensions for known file types
精彩评论