kpizzle
October 21st, 2008, 10:33 AM
Alright.
I am trying to filter the open file dialog file types to only include images, as this open file dialog is for selecting images. I have a question, and am not sure it is possible. I cannot find a clear answer on the internet. Right now, I am filtering for image files like so:
openFilePic.Filter = "Graphics Interchange Format Files (.gif) | *.gif|" +
"JPEG File Interchange Format (.jpeg) | *.jpeg|" +
"JPG File Interchange Format (.jpg) | *.jpg|" +
"MS Windows Bitmap Files (.bmp) | *.bmp|" +
"Portable Networks Graphics (.png) | *.png|" +
"Tagged Image File Format (.tiff) | *.tiff|" +
"Windows Enhanced Metafile (.emf) | *.emp|" +
"Windows Metafile (.wmf) | *.wmp";
This doesn't really stoke me out... I don't like it, but it DOES work. (I can't really trust the user to know what they are doing, which is why I can't use "show all files|*.*")
My question:
Is there any way to combine these file types, to do something like "Show all Image Files"?
I have tried combining the file types by using + signs, commas, breaking the quotes and using '&'...nothing seems to work. I can't seem to find the solution online here.
Was wondering if any of you knew whether it was possible or not? Thanks!
Using .Net 9.0
I am trying to filter the open file dialog file types to only include images, as this open file dialog is for selecting images. I have a question, and am not sure it is possible. I cannot find a clear answer on the internet. Right now, I am filtering for image files like so:
openFilePic.Filter = "Graphics Interchange Format Files (.gif) | *.gif|" +
"JPEG File Interchange Format (.jpeg) | *.jpeg|" +
"JPG File Interchange Format (.jpg) | *.jpg|" +
"MS Windows Bitmap Files (.bmp) | *.bmp|" +
"Portable Networks Graphics (.png) | *.png|" +
"Tagged Image File Format (.tiff) | *.tiff|" +
"Windows Enhanced Metafile (.emf) | *.emp|" +
"Windows Metafile (.wmf) | *.wmp";
This doesn't really stoke me out... I don't like it, but it DOES work. (I can't really trust the user to know what they are doing, which is why I can't use "show all files|*.*")
My question:
Is there any way to combine these file types, to do something like "Show all Image Files"?
I have tried combining the file types by using + signs, commas, breaking the quotes and using '&'...nothing seems to work. I can't seem to find the solution online here.
Was wondering if any of you knew whether it was possible or not? Thanks!
Using .Net 9.0