I tried this but I think it's for 32bit Windows only.
How to move mouse cursor using C#?
I am getting lots of red underline errors like "Cursor does not contain a definition for Position" and "Rectangle does not contain a constructor that takes 2 arguments"
private void MoveCursor()
{
// Set the Current cursor, move the cursor's Position,
// and set its clipping rectangle to the form.
this.Cursor = new Cursor(Cursor.Current.Handle);
Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y - 50);
Cursor.Clip = new Rectangle(this.Location, this.Size);
}
Searched older threads but I think the code is outdated and doesn't work in Windows 64 bit OS. So I'm looking for new code if there is any.