Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi if abfrage bei mouse_event?? (https://www.delphipraxis.net/20808-if-abfrage-bei-mouse_event.html)

Wadim 23. Apr 2004 14:48


if abfrage bei mouse_event??
 
hi,

ich will per eine if befehl abfragen ob die rechte maustaste gedrückt ist aber das klapt irgendwie nicht :-(

hab schon versucht mit:

Delphi-Quellcode:
if mouse_event (mouseeventf_rightdown,0,0,0,0) then
  begin
    irgendwas
  end;
geht aber nicht, kann mir da jemand irgendwie helfen??

NicoDE 23. Apr 2004 15:01

Re: if abfrage bei mouse_event??
 
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Caption := '';
  if (GetKeyState(VK_LBUTTON) < 0) then
    Caption := 'LMT ';
  if (GetKeyState(VK_MBUTTON) < 0) then
    Caption := Caption + 'MMT ';
  if (GetKeyState(VK_RBUTTON) < 0) then
    Caption := Caption + 'RMT ';
end;

Wadim 23. Apr 2004 15:05

Re: if abfrage bei mouse_event??
 
Zitat:

Zitat von NicoDE
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Caption := '';
  if (GetKeyState(VK_LBUTTON) < 0) then
    Caption := 'LMT ';
  if (GetKeyState(VK_MBUTTON) < 0) then
    Caption := Caption + 'MMT ';
  if (GetKeyState(VK_RBUTTON) < 0) then
    Caption := Caption + 'RMT ';
end;

big THX :thuimb:

mfg wadim


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz