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