- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key=13 then Halt;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var p: TPoint;
begin
p.X:=Random(Screen.Width);
p.Y:=Random(Screen.Height);
SetCursorPos(p.X,p.Y);
mouse_event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN,p.X,p.Y,0,0);
mouse_event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP,p.X,p.Y,0,0);
end;
end.
вот цитата с http://msdn.microsoft.com/en-us/library/ms646260%28VS.85%29.aspx
"Windows NT/2000/XP: This function has been superseded. Use SendInput instead."
if key=13 then Halt;
Какой халт? Клоз, граждане...