Autor Beitrag
M. Raab
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334
Erhaltene Danke: 1

WIN 7
Delphi XE
BeitragVerfasst: So 29.01.06 15:36 
Hallo,

ich habe auf einem Form ein Image und möchte auf diesem Image zeichnen. Mit der Maus kann man klicken und zieht die Maus dann - dann erscheint eine Linie.

Problem nun: in meinem MouseMove Ereignis kann ich nicht feststellen, welche Maustaste gedrückt wurde. Ich könnte nun beim MouseDown Ereignis die Taste festhalten und diese Info dann im MouseMove Ereignis verwenden. Gibt es aber keine Möglichkeint im MouseMove Ereignis festzustellen, welche Taste gedrückt wurde ? Ziel wäre es zu wissen, mit welcher Maustaste der Nutzer die Maus zieht ?

Gruss


Markus


Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am So 29.01.2006 um 14:49

_________________
Das Leben besteht aus Bits und Bytes - nur: wo laufen sie denn ????
Super ... Du kannst das zwar lesen, toll..... aber: völlig zwecklos !!!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: So 29.01.06 15:49 
Guck mal nach, was das hervorgehobene so bedeutet ;-)
ausblenden Delphi-Quelltext
1:
TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,  Y: Integer);					

_________________
We are, we were and will not be.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: So 29.01.06 15:49 
Hallo,

bei mir geht das so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
  if ssLeft in Shift then
    Caption := 'Linke Maustaste';
  if ssRight in Shift then
    Caption := 'Rechte Maustaste';

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
M. Raab Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 334
Erhaltene Danke: 1

WIN 7
Delphi XE
BeitragVerfasst: So 29.01.06 16:04 
Hallöchen,


Peinlich wa ????


Nun ja: ich dachte Shift hätte nur was mit den Tasten zu tun....


Aber: es klappt !!


Vielen Dank und Gruss


Markus

_________________
Das Leben besteht aus Bits und Bytes - nur: wo laufen sie denn ????
Super ... Du kannst das zwar lesen, toll..... aber: völlig zwecklos !!!