显示文件路径已经实现,使用的是FolderBrowserDialog控件。但是选取文件中的图片使其上传到picturebox中不懂怎么实现
选取文件用OpenFileDialog,FolderBrowserDialog选的是文件夹。
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = Image.FromFile(ofd.FileName);
}
pictureBox1.ImageLocation = imgPaath;