Einzelnen Beitrag anzeigen

t.roller
(Gast)

n/a Beiträge
 
#10

AW: Mouse-Koordinaten ... die 20154. :-(

  Alt 17. Apr 2017, 04:34
Auch wenn die Form nicht den Focus hat, funktioniert es:
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
var MausPos: TPoint;
begin
  if getAsyncKeystate(VK_LBUTTON)<>0 then
  BEGIN
     GetCursorPos(MausPos);
     label1.Caption := IntToStr(MausPos.x);
     label2.Caption := IntToStr(MausPos.y);
  END;
end;

Geändert von t.roller (17. Apr 2017 um 10:16 Uhr)
  Mit Zitat antworten Zitat