Autor Beitrag
arcitC|Crash
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 88


D4 weiter weiß ich net
BeitragVerfasst: So 31.10.04 16:37 
Wie benutze ich "GetCursorPos" ? In der Hilfe steht nur: "GetCursorPos: TPoint" ... Aha, toll, was ist Tpoint?
Ich will das erst die Maus Position berechnet wird und dann bei "SetCursorPos(x,y)" eingesetzt wird.
THX schon mal!
Benutzername
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 210

Win XP Pro
Delphi 7 PE, D2005 Prof. SSL
BeitragVerfasst: So 31.10.04 16:40 
ausblenden Delphi-Quelltext
1:
2:
Label1.Caption:='X-Position: '+inttostr(Mouse.GetCursorPos.X);
Label2.Caption:='Y-Position: '+inttostr(Mouse.GetCursorPos.Y);


Probier das mal ;-)
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: So 31.10.04 16:41 
Wenn du schon in der Delphi-Hilfe gesucht hast, hättst auch nochmal weitersuchen können:
Zitat:
TPoint type defines a pixel location onscreen.

Unit

Types

type TPoint = packedrecord
X: Longint;
Y: Longint;
end;

Description

The TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.


**edit: warum is eigentlich immer jemand schneller als ich :?


Zuletzt bearbeitet von Luzzifus am So 31.10.04 16:43, insgesamt 2-mal bearbeitet
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: So 31.10.04 16:41 
arcitC|Crash hat folgendes geschrieben:
Wie benutze ich "GetCursorPos" ? In der Hilfe steht nur: "GetCursorPos: TPoint" ... Aha, toll, was ist Tpoint?

Wie wärs, wenn du auch die Hilfe zu TPoint liest?

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 31.10.04 16:42 
arcitC|Crash hat folgendes geschrieben:
[...]toll, was ist Tpoint?


F1 weiß es: :roll:

Zitat:
Der Typ TPoint definiert eine Pixel-Position auf dem Bildschirm.

Unit

Windows

type TPoint = record
X: Longint;
Y: Longint;
end;

Beschreibung

Der Typ TPoint definiert eine Pixel-Position auf dem Bildschirm. Der Ursprung liegt in der linken oberen Ecke. X gibt die horizontale und Y die vertikale Koordinate des Punktes an.

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: So 31.10.04 16:44 
viermal die gleiche antwort.. :shock: :lol:
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 31.10.04 16:56 
Luzzifus hat folgendes geschrieben:
viermal die gleiche antwort.. :shock: :lol:


so ungefähr... ;-) etz hat er alles, was er braucht: ein Beispiel, einen guten Rat, eine enlgische und eine deutsche HIlfe :lol:

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
arcitC|Crash Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 88


D4 weiter weiß ich net
BeitragVerfasst: Mo 01.11.04 18:49 
LOL man ist das geil!! Hehe :D Da kriegt man gleich alle Antworten aufeinmal. Ich hab ja weiter gesucht danach. Aber wenn ich ehrlich sein soll..., ich kapier das nicht, was in der Hilfe steht...ist so dumm beschrieben... :( Es muss schließlich auch dumme Menschen geben.. Aber egal, riesen DANKE!
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 01.11.04 19:12 
Du hast recht, es ist ein wenig kompliziert. Aber wenn man sich mit typen und klassen und so ein ****** auskennt (tu ich nicht) dann versteht man es. Ich hab halt rumprobiert und mal ein .x und .y rangehängt weil ich dachte irgentwie muss man ja auf die dinger zugreifen können, und da delphi Punktsyntax benutzt... :D siehe da, es klappt ^^

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.