Autor Beitrag
hannibal87
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Fr 08.04.05 15:43 
Hallo,
wie kann ich überpfrüfen, ob die linke Maustaste gedrückt wird.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Fr 08.04.05 15:44 
Schau mal nach OnClick... ;)

Suche in: Delphi-Forum, Delphi-Library ONCLICK
hannibal87 Threadstarter
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Fr 08.04.05 15:49 
Dann finde ich nichts!
Ich möchte nur eine überprüfung in der Art:
if "mausklick=linkemaustaste" then ...
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 08.04.05 15:52 
da muss du nen hook nehmen, also lass es lieber ^^ oder du fragst das mouseup/down ab und änderst das in einer variable die du dann in deinem programm abfragen kannst, oder brauchst du das global, dann musst du nen hook nehmen :?
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Fr 08.04.05 15:56 
Dann such nach OnMouseDown bzw. OnMouseUp... ;)

//EDIT: Und schau mal hier meinen zweiten Beitrag... ;)
hannibal87 Threadstarter
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Fr 08.04.05 15:57 
Ich möchte abfragen,ob die Maus über einem dynamisch erstellten Shape ist und wenn ja, dann soll ,wenn mit der linken Maustaste geklickt wird, eine Procedure ausgefürt werden.

Die Abfrage, wo sich die Maus befindet(GetCursorPos(position) habe ich schon.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Fr 08.04.05 15:58 
Siehe oben meinen "//EDIT"... ;)
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 08.04.05 16:11 
siehe hier: www.delphi-forum.de/...hlight=wmlbuttondown drittunterster beitrag.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
hannibal87 Threadstarter
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Fr 08.04.05 16:12 
(wie soll das: www.delphi-forum.de/viewtopic.php?t=3933 helfen?)

Ich mag ja dumm sein und nerven, aber ich habe keine von Begin an Feste Shapes, die ich mit
mousedown-Ereignissen ausstatten kann.

Das ist bis jetzt meine Procedure:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Procedure  tform1.Klick;
var u,x,y : integer;
var position : tpoint;
var  a : TShiftState;
begin
GetCursorPos(position);

for u:=1 to Zaehler do

 if position.x>(TShape(FindComponent('auf'+inttostr(u))).left) then 
 if position.x<(TShape(FindComponent('auf'+inttostr(u))).left)                                    +(TShape(FindComponent('auf'+inttostr(u))).width)then
 if position.y>(TShape(FindComponent('auf'+inttostr(u))).top)+20 then 
 if position.y<(TShape(FindComponent('auf'+inttostr(u))).top)+(TShape(FindComponent('auf'+inttostr(u))).height)+20then
 begin

 //wenn mausklick,dann.....

 end;
end;


Moderiert von user profile iconraziel: Delphi-Tags hinuzgefügt.
fvolk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 203

Win XP (Home & Pro)
Delphi 2005 Pers
BeitragVerfasst: Fr 08.04.05 16:20 
Warum weist du dem OnClick-Ereignis deines dynamisch erzeugten Shapes nicht einfach eine Funktion zu?

_________________
Nichts auf der Welt ist so gerecht verteilt wie der Verstand. Denn jedermann ist überzeugt, dass er genug davon habe.
(René Descartes)
hannibal87 Threadstarter
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Fr 08.04.05 16:22 
Wie geht das?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 08.04.05 16:25 

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...