yw3579293 发表于 2013-7-5 18:22:16

OpenFileDialog Filter属性设置所有图片格式

C# Code:

OpenFileDialog _dialog = new OpenFileDialog();

_dialog.Filter =
"All Image Files|*.bmp;*.ico;*.gif;*.jpeg;*.jpg;*.png;*.tif;*.tiff|"
"Windows Bitmap(*.bmp)|*.bmp|"
"Windows Icon(*.ico)|*.ico|"
"Graphics Interchange Format (*.gif)|(*.gif)|"
"JPEG File Interchange Format (*.jpg)|*.jpg;*.jpeg|"
"Portable Network Graphics (*.png)|*.png|"
"Tag Image File Format (*.tif)|*.tif;*.tiff";

if (DialogResult.OK == _dialog.ShowDialog(this))
{

羽叶 发表于 2013-7-5 18:25:36

呵呵,这倒是省事了,感谢分享

yw3579293 发表于 2013-7-5 18:28:32

天堂羽叶 发表于 2013-7-5 18:25
呵呵,这倒是省事了,感谢分享

不用谢,在论坛里我也学会了很多东西,大家相互共享,相互学习!
页: [1]
查看完整版本: OpenFileDialog Filter属性设置所有图片格式