I am trying to send a simulated mouse click to another application. I understand how to actually send the key click, this is not the issue. I need to send the mouse click to the
Set the cursor position AND also set 0,0 as X and Y in the mouse_event routine:
SetCursorPos(x, y); mouse_event(MouseEventFlag.LeftDown, 0, 0, 0, UIntPtr.Zero); mouse_event(MouseEventFlag.LeftUp, 0, 0, 0, UIntPtr.Zero);
Working fine for me now.