Autor Beitrag
DaClown
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: Mo 16.08.04 17:25 
Hi,
ich wollte mal ein kleines Programm basteln, mit dem man auf dem Bildschirm Entfernungen messen kann, und damit vielleicht auf Winkel. Bisher habe ich, was auch nicht sonderlich schwer war nur die Mausposition:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Timer1Timer(Sender: TObject);
var
  P  :TPoint;
begin
  GetCursorPos(P);
  panel1.caption:=inttostr(P.x)+' x '+inttostr(P.y); 
end;

Was ich jetzt noch bräuchte wäre die Mausposition wenn man klickt, aber egal wo man auf dem Bildschirm ist. Mit zwei Klicks deren Positionen gespeichert werden kann man ja den Rest machen. Wie kann ich also mitkriegen, ob geklickt wurde, wenn man nicht auf der Form ist ?

Hier noch ein kleinen Bild wies aussehen sollte:
user defined image


Moderiert von user profile iconMotzi: Topic aus VCL (Visual Component Library) verschoben am Di 17.08.2004 um 12:17
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 16.08.04 17:33 
Da dürfte Dir wohl nur ein MausSuche in: Delphi-Forum, Delphi-Library HOOK helfen...
Empfehlenswert ist hier das Hook-Tutorial von Assarbad:
assarbad.net/de/stuff/tutorials/hooks/

raziel

_________________
JSXGraph