![]() |
Shortcuts aktiv lassen, auch wenn Form versteckt ist?
Hallo,
ich habe auf meiner Hauptform eine ActionList hinzugefügt und dieser den Shortcut 'CTRL+SHIFT+A' gegeben. OnExecute sieht wie folgt aus:
Delphi-Quellcode:
Wenn die Hauptform also sichtbar ist, soll sie unsichtbar werden, ansonsten wieder sichtbar werden. Diese Aktion habe ich auch auf einem TrayIcon und klappt wunderbar per Mausklick, allerdings mit dem Shortcut kann ich das Fenster nur hiden, es wird beim zweiten Drücken aber nicht wieder sichtbar.
procedure Tmain.strg_shift_aExecute(Sender: TObject);
begin if main.Visible then begin main.Hide; end else begin main.Show; main.BringToFront; Application.BringToFront; end; end; Wie kann ich es machen, dass der Shortcut auch aktiv bleibt, wenn die Hauptform unsichtbar ist? |
Re: Shortcuts aktiv lassen, auch wenn Form versteckt ist?
Dazu brauchst du einen systemweiten Hotkey, da dein fenster den Eingabefocus nicht mehr hat, wenn es nicht aktiv ist. Es kann also auf deine Tastendrücke nicht reagieren.
|
Re: Shortcuts aktiv lassen, auch wenn Form versteckt ist?
Zitat:
|
Re: Shortcuts aktiv lassen, auch wenn Form versteckt ist?
|
Re: Shortcuts aktiv lassen, auch wenn Form versteckt ist?
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:07 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 by Thomas Breitkreuz