int x,y; void MainFormMouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { x = e.X; y = e.Y; } } void MainFormMouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { this.Location = new Point(this.Location.X + (e.X - x), this.Location.Y + (e.Y - y)); } }