Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenFileDialog filter 1

Status
Not open for further replies.

swetham

Programmer
May 5, 2010
257
0
0
DE
I need to filter files of .png,.bmp,.jpg type. If user clicks on all files, the files with the above three file types only should be displayed.
 

Here you go:

Code:
        Dim FilterStr As String

        FilterStr = "PNG files (*.png)|*.png|JPEG files (*.jpg)|*.jpg|Bitmap files (*.bmp)|*.bmp|All PNG, JPEG and Bitmap files (*.png, *.jpg, *.bmp)|*.png;*.jpg;*.bmp"

        OpenFileDialog1.Filter = FilterStr

        OpenFileDialog1.ShowDialog()

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top