CodePudding user response:
After the application loses focus, the mouse simulated doesn't work,How the mouse simulation, it is suggested that, by means of drawing animation simulation mouse,
CodePudding user response:
It has been a constant focusCodePudding user response:
Method is very bad, I use the TIMERProcedure TForm1. Timer1Timer (Sender: TObject);
The begin
If (Self. Handle=GetForegroundWindow) then
Exit;
If SetWindowPos (Self. Handle, HWND_TOPMOST, the Self. The Left, the Self. The Top, the Self. The Width of the Self. The Height, SWP_SHOWWINDOW) then
='Set' Self. Caption:
The else
Self. Caption:='Not Set';
end;
CodePudding user response:
Try using MouseEvent and KeyEvent such function