Multiple file extensions in OpenFileDialog

前端 未结 3 1235
失恋的感觉
失恋的感觉 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:30

    Try:

    Filter = "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff"
    

    Then do another round of copy/paste of all the extensions (joined together with ; as above) for "All graphics types":

    Filter = "BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff|"
           + "All Graphics Types|*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff"
    

提交回复
热议问题