static void c_MouseMove(object sender, MouseEventArgs e) { if (isDragging == true) { Control c = sender as Control; c.Left += e.X - move.X; c.Top += e.Y - move.Y; } }