Multiple file extensions in OpenFileDialog

前端 未结 3 1234
失恋的感觉
失恋的感觉 2021-01-30 11:54

How can I use multiple file extensions within one group using OpenFileDialog? I have Filter = \"BMP|*.bmp|GIF|*.gif|JPG|*.jpg|PNG|*.png|TIFF|*.tiff\" a

3条回答
  •  再見小時候
    2021-01-30 12:32

    This is from MSDN sample:

    (*.bmp, *.jpg)|*.bmp;*.jpg
    

    So for your case

    openFileDialog1.Filter = "JPG (*.jpg,*.jpeg)|*.jpg;*.jpeg|TIFF (*.tif,*.tiff)|*.tif;*.tiff"
    

提交回复
热议问题