Exemplo n.º 1
0
        } // OpenPictureInNewForm

        private void openPictureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (PictureFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                OpenPictureInNewForm(PictureFileDialog.FileName);
            }
        } // openPictureToolStripMenuItem_Click
Exemplo n.º 2
0
        private void AttachPhotoPictureBox1_Click(object sender, EventArgs e)
        {
            if (PictureFileDialog.ShowDialog() == DialogResult.OK)
            {
                PreviewPhotoPictureBox.Load(PictureFileDialog.FileName);
                ClearImagePictureBox1.Show();
            }

            PictureFileDialog.FileName = string.Empty;
        }
Exemplo n.º 3
0
 private void LoadPicture(object sender, EventArgs e)
 {
     if (PictureFileDialog.ShowDialog() == DialogResult.OK)
     {
         Bitmap bitmap = new Bitmap(PictureFileDialog.FileName);
         Image  old    = OriginalPicture.Image;
         OriginalPicture.Image = Image.FromFile(PictureFileDialog.FileName);
         old?.Dispose();
         OriginalPicture.Refresh();
     }
 }