private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { if (HasPicture) { if (RectangleSelected.Contains(e.Location)) { SetImgaeMiniShow(); } } IsMouseDown = false; pictureBox1.Refresh(); }
private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { if (IsMouseOver && HasPicture) { if (RectangleSelected.Contains(e.Location)) { IsMouseDown = true; MouseDownPoint = e.Location; MouseMovePrecives = e.Location; } } pictureBox1.Focus(); }
private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (IsMouseOver && HasPicture) { if (RectangleSelected.Contains(e.Location)) { Cursor = Cursors.SizeAll; if (IsMouseDown) { MoveByPoint(e.Location); } } else { Cursor = Cursors.Default; } } }