private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { if (!moveFlag && e.Clicks >= 1) moveFlag = true; x = e.X; y = e.Y; base.OnMouseDown(e); } private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (moveFlag && (e.Button == MouseButtons.Left)) this.SetBounds(Left + e.X - x, Top + e.Y - y, this.Width, this.Height); base.OnMouseMove(e); } private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { if (moveFlag) moveFlag = false; base.OnMouseUp(e); }