ich habe es auch in Form.KeyDown!!
Delphi-Quellcode:
procedure TForm1.keyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
//showmessage(IntToStr(Mouse.cursorpos.x));
if (char(key) = 'W') then
begin
m.X:= Mouse.cursorPos.X;
m.y:= Mouse.cursorpos.Y;
up.Enabled:= true;
end else
begin
end;
end;
procedure TForm1.UpTimer(Sender: TObject);
begin
//Mouse.CursorPos:= Point(Mouse.CursorPos.X, Mouse.CursorPos.Y+100);
m.Y:= m.y+5;
Windows.SetCursorPos(m.X, m.Y);
end;