I'm looking to send a mouse click to a specific position on a screen without affecting the mouse cursor's location.
I've scoured and have tried everything under the sun with mouse_event (which is supposed to do this)
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0);
However this ends up only sending a mouse click to wherever the position of the mouse is. So I end up having to move the mouse to get it to work.
Cursor.Position = new Point(X, Y);
Anyone have any idea how I can do this WITHOUT having to move the mouse? I've also tried the following code block with no success as it still only clicked where the mouse cursor position was which really threw me for a loop as I figured this would have worked...
Cursor.Position = new Point(X, Y);
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0);
Cursor.Position = new Point(oldX, oldY);
Thanks in advance for any help!