![]() |
TApplicationEvents - OnShortcut
Moin leute, ich hab da ein problem.
ich bräuchte ne erklärung (oder n kleines tutorial) zu dem event onShortcut des TApplicationEvents. ich möchte einfach nur n shortcut auf meiner main-form, wenn man z.b. strg+p drückt, dass dann die z.b. die einstellungen aufgerufen werden. wie man nur den shortcut p abfängt, hab ich schon raus, aber wie kann man erkennen, ob gleichzeitig auch noch strg gedrückt wurde? danke schonmal für eure (hoffentlich kommenden) antworten :) phXql |
Re: TApplicationEvents - OnShortcut
Zitat:
Hi, Mit GetKeyState. Ein Beispiel:
Delphi-Quellcode:
procedure TForm1.ApplicationEvents1ShortCut(var Msg: TWMKey;
var Handled: Boolean); begin if (Msg.CharCode = Ord('P')) and (GetKeyState(VK_CONTROL) < 0) then begin ShowMessage('strg+p'); Handled := true; end; end; |
Re: TApplicationEvents - OnShortcut
is ja ganz einfach ;), danke für die schnelle hilfe :)
phXql |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz