private void button1_Click(object sender, EventArgs e) { try { openFileDialog1.FileName = ""; if (openFileDialog1.ShowDialog() == DialogResult.OK) { pictureBox1.Image = Image.FromFile(openFileDialog1.FileName); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
MM Online Express | Best product Review and Online Marketing site
private void button1_Click(object sender, EventArgs e)
ReplyDelete{
try
{
openFileDialog1.FileName = "";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}