Esempio n. 1
0
        private void pictureBoxSetKind_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            PictureBox pictureBox = sender as PictureBox;

            if (pictureBox.Image == null)
            {
                return;
            }
            ImageViewForm form = new ImageViewForm();

            form.Height          = Screen.GetWorkingArea(this).Height;
            form.Width           = form.Height * pictureBox.Image.Width / pictureBox.Image.Height;
            form.BackgroundImage = pictureBox.Image;
            form.Show();
        }
Esempio n. 2
0
 private void pictureBoxSetKind_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     PictureBox pictureBox = sender as PictureBox;
     if (pictureBox.Image == null)
         return;
     ImageViewForm form = new ImageViewForm();
     form.Height = Screen.GetWorkingArea(this).Height;
     form.Width = form.Height * pictureBox.Image.Width / pictureBox.Image.Height;
     form.BackgroundImage = pictureBox.Image;
     form.Show();
 }