Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Application.Terminate mit PopupMenu (https://www.delphipraxis.net/61288-application-terminate-mit-popupmenu.html)

Patlinet 19. Jan 2006 14:43


Application.Terminate mit PopupMenu
 
Hallo Delphianer

Ich möchte ein Programm über einen Timer (TTimer) beenden (Application.Terminate). Leider funktioniert dies nicht, wenn ein PopupMenu geöffnet ist. Kann mir da jemand weiterhelfen? :gruebel:

Patlinet 19. Jan 2006 16:52

Re: Application.Terminate mit PopupMenu
 
Wir haben eine Lösung gefunden. Danke trotzdem.

Delphi-Quellcode:
procedure Txyz.TimerHandler(aSender: TObject);
begin
  DestroyWindow(GetForegroundWindow); // Diese Zeile zerstört ein allfälliges PopupMenu
  Application.Terminate;
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:27 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