I have two monitors with the non-primary monitor (number 1) set to the main one's (number 2) top left like this:
I'll repeat: number 2 is the primary monitor.
Here's the code:
Cursor.Position = new Point(-500, -500);
What happens is that when the cursor is initially in the primary monitor (number 2), after the code is executed, the cursor moves to monitor number 1, to a location 500 pixels up from its bottom, but to its far right. Here:
Instead of here:
After running the above code twice, like so:
Cursor.Position = new Point(-500, -500);
Cursor.Position = new Point(-500, -500);
It gets to the correct place.
The problem is that this code seems like a hack and I'd like to avoid it, and get the cursor to the correct place in a "correct" way.
So how do I achieve that?