Form1.cs
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespace_0059 {-
publicpartialclassForm1 : Form { -
publicForm1() { -
InitializeComponent(); -
} -
privatevoidbutton1_Click(objectsender, EventArgs e) { -
openFileDialog1.Filter ="Images (*.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.png) | *.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.png"; -
if(openFileDialog1.ShowDialog() == DialogResult.OK) { -
Bitmap myImage =newBitmap(openFileDialog1.FileName); -
pictureBox1.Image = (Image)myImage; -
textBox1.Visible =true; -
textBox1.Text = openFileDialog1.FileName; -
} -
} -
} }
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespace_0059 {-
publicpartialclassForm1 : Form { -
publicForm1() { -
InitializeComponent(); -
} -
privatevoidbutton1_Click(objectsender, EventArgs e) { -
openFileDialog1.Filter ="Images (*.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.png) | *.jpg; *.jpeg; *.gif; *.bmp; *.ico; *.png"; -
if(openFileDialog1.ShowDialog() == DialogResult.OK) { -
Bitmap myImage =newBitmap(openFileDialog1.FileName); -
pictureBox1.Image = (Image)myImage; -
textBox1.Visible =true; -
textBox1.Text = openFileDialog1.FileName; -
} -
} -
} }