I can only enter one item in the Filter property of a common dialog box. How can I add more so that the box show more types of files? such as:
http://www.hardsoftc.com/charles/filter.jpg
Printable View
I can only enter one item in the Filter property of a common dialog box. How can I add more so that the box show more types of files? such as:
http://www.hardsoftc.com/charles/filter.jpg
You add more filters just by typing them after each other.
Code:comdialog.Filter = "Text (*.txt)|*.txt|Pictures (*.bmp;*.ico)|*.bmp;*.ico"
fredrik, that method will allow them to open any of those files when only that one is clicked. Try this:
CommonDialog1.Filter = "Bitmap (*.bmp)|*.bmp|GIF (*.gif)|*.gif|JPEG (*.jpg, *.jpeg)|*.jpg;*.jpeg"
etc.
You can seperate them with the pipe "|" character.