Das Problem ist gelöst.
Ich habe nun eine funktionierende, brauchbare Lösung gefunden:
Delphi-Quellcode:
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);
var diffx, diffy : Integer;
begin
if (Msg.message = WM_MOUSEMOVE) then
begin
label3.caption:= 'Mouse.CursorPos.X : '+Format('%d', [Mouse.CursorPos.X]);
label4.caption:= 'Mouse.CursorPos.Y : '+Format('%d', [Mouse.CursorPos.Y]);
diffx:= Abs(oldX-Mouse.CursorPos.X);
diffy:= Abs(oldY-Mouse.CursorPos.Y);
Label6.Caption:= 'DiffX: '+ IntToStr(diffx);
Label7.Caption:= 'DiffY: '+IntToStr(diffy);
if (diffx>10) or (diffy>10) then
BEGIN
oldX:=Mouse.CursorPos.X;
oldY:=Mouse.CursorPos.Y;
SetCursorPos(Mouse.CursorPos.X +diffx div 10,Mouse.CursorPos.Y +diffy div 10);
END;
end;
end;