c#选择打开本地图片,并在picturebox上显示

OpenFileDialog openfile = new OpenFileDialog();

if (openfile.ShowDialog() == DialogResult.OK && (openFileDialog1.FileName != "")
{
picturebox1.ImageLocation = openfile.FileName;
textbox.Text = openfile.FileName;
}

openfile.Dispose();

原文地址:https://www.cnblogs.com/ACshasow/p/3253287.html