private void PaintPanel_MouseDown(object sender, MouseEventArgs e) { PaintPanel.Select(); startDrag.X = e.Location.X; startDrag.Y = e.Location.Y; startPointOffset.X = OffsetPaintBox.X; startPointOffset.Y = OffsetPaintBox.Y; }