Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Title = "Open Image";
            dlg.Filter = "bmp files (*.bmp)|*.bmp";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
            PictureBox PictureBox1 = new PictureBox();
                PictureBox1.Image(dlg.FileName);
            }

            dlg.Dispose();
        }