滑鼠模擬,程式失去焦點后不起作用?
uj5u.com熱心網友回復:
程式失去焦點后,滑鼠模擬的確不起作用。如何滑鼠模擬,建議通過畫圖影片的方式,模擬滑鼠。
uj5u.com熱心網友回復:
那就一直保持焦點呢uj5u.com熱心網友回復:
我的方法很爛,用了TIMERprocedure TForm1.Timer1Timer(Sender: TObject);
begin
if (Self.Handle=GetForegroundWindow) then
Exit;
if SetWindowPos(Self.Handle, HWND_TOPMOST,Self.Left ,Self.Top, Self.Width ,Self.Height, SWP_SHOWWINDOW) then
Self.Caption:='Set'
else
Self.Caption:='Not Set';
end;
uj5u.com熱心網友回復:
使用MouseEvent和KeyEvent這類函式試試轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/87379.html
