Autor Beitrag
diego
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Mi 09.10.02 13:58 
hi,

wie kann ich mir die aktuelle mausposition anzeigen lassen. also so das immer irgendwo die x/y werte der position stehen???

mfg diego
a.C.k
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 93

WIN 2000
Delphi 6 Enterprise ; Delphi 7 Studio
BeitragVerfasst: Mi 09.10.02 14:12 
Versuche es mal mit "Mouse.CursorPos.X" und "Mouse.CursorPos.Y"

_________________
Wer nicht gerne denkt, sollte wenigstens von Zeit zu Zeit seine Vorurteile neu gruppieren.
diego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Mi 09.10.02 14:25 
ok danke das klappt mal.

hab nun folgenden code:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
a:=Mouse.CursorPos.X;
b:=InttoStr(a);
edit1.text:=b;

c:=Mouse.CursorPos.Y;
d:=IntToStr(c);
edit2.text:=d;



wie kann ich das nun hinbiegen das sich das ständig aktualisiert??? also wenn ich die maus bewege das sie die zahlen ändern???[/code]
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 09.10.02 14:46 
Hi!

Wenn Du das ganze ins OnMouseMove-Event der Form packst, geht's ganz einfach:

ausblenden Quelltext
1:
2:
  edit1.Caption:=IntToStr(Mouse.CursorPos.x);
  edit2.Caption:=IntToStr(Mouse.CursorPos.Y);



MfG,
Peter

P.S.: Die Paramter X,Y von OnMouseMove geben Dir die Position innerhalb der Form!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
diego Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Mi 09.10.02 15:04 
danke