Search code examples
c#winformsopenfiledialog

Can OpenFileDialog receive filename *.*?


I want to use OpenFileDialog as selecting file with expression( . or *.zip) On File Name EditBox.

Do I have to override OpenFileDialog ? if then, please give me a tip about it.

At now, If I put file name as . and click 'open' , the OpenFileDialog doesn't return anything.

Sorry about my poor English.

enter image description here


Solution

  • You can't do what you want with OpenFileDialog. It wraps up the common Windows component which has special treatment for file names that contain wildcards. Those are interpreted as filters for the file list view.