//打开文件夹操作
FolderBrowserDialog fd = new FolderBrowserDialog();
if (fd.ShowDialog() == DialogResult.OK)
{
textBox1.Text = “I am OK” + fd.SelectedPath;
}
//选择显示图片操作
OpenFileDialog openFi = new OpenFileDialog();
openFi.Filter = “图像文件(JPeg, Gif, Bmp, etc.)|*.jpg;*.jpeg;*.gif;*.bmp;*.tif; *.tiff; *.png| JPeg 图像文件(*.jpg;*.jpeg)”
+ “|*.jpg;*.jpeg |GIF 图像文件(*.gif)|*.gif |BMP图像文件(*.bmp)|*.bmp|Tiff图像文件(*.tif;*.tiff)|*.tif;*.tiff|Png图像文件(*.png)”
+ “| *.png |所有文件(*.*)|*.*”;
if (openFi.ShowDialog() == DialogResult.OK)
{
pictureBox1.ImageLocation = openFi.FileName;
}