Today is writing a tool software that uses a system API: mouse_event()
The code is as follows:
Mouse_event (Mouseeventf_absolute | Mouseeventf_move, x2, y2, 0, 0); Move to the specified position
But I found a problem, when the software window is active, mouse_event can execute normally.
When the software window is minimized, Mouse_event has no effect.
For this problem, I spent nearly 3 hours, also did not check out the problem where?
Finally try to put 360 security Butler quit, run the program again, Mouse_event () unexpectedly everything is back to normal.
I started the 360 again, try again, mouse_event () again.
Final conclusion:
360 for security reasons, Mouse_event () is masked by 360 when the program window is inactive.
If 360 can be shielded mouse_event, give a safety hint, just fine, so I don't waste so much time.
System API execution is not effective, you can check if it is related to 360 security guards?!