Autor Beitrag
ManuelGS
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 173

Win XP HE, Suse Linux
D6, D7, D2005 Personal
BeitragVerfasst: Mi 28.07.04 20:03 
Hallo!
Ich habe da mal wieder zwei Probleme:

1. Ich habe ein Programm geschrieben, dessen Form nicht über das x geschlossen werden kann
(onclosequery), sondern nur über einen Button;
Jetzt gibt es aber ein Problem: Wenn ich Windows herunterfahren lasse, schließt sich das Programm ebenfalls nicht, so dass ich jedesmal manuell schließen müsste. Wie kann ich dieses Problem lösen?
Vielleicht sendet Windows ja irgendeine Message, die man abfangen könnte, oder so was?!

2. Ebenfalls soll mein Programm die Eigenschaft haben nur im Vordergrund (also mit Fokus) zu arbeiten; sobald der Fokus auf ein anderes Programm gesetzt wird, soll sich mein Programm (in dem Fall) minimieren. Hab das schon mit OnDeactivate versucht, funktionierte aber nicht.
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 28.07.04 22:13 
Normalerweise für jede Frage einen eigenen Thread! :mahn:


1.: Suche im MSDN WM_QUERYENDSESSION (bzw Suche in: Delphi-Forum, Delphi-Library WM_QUERYENDSESSION und Suche in der Delphi-PRAXiS WM_QUERYENDSESSION)
2.:
Delphi-Hilfe hat folgendes geschrieben:
Use OnDeactivate to perform special processing when the form transitions from being the active form to another form in the same application becoming the active form. If activation goes to another application, this event is not triggered. To determine if another application has become active, Use the TApplication object’s OnDeactivate event.
Zu finden im Reiter "Additional", hörend auf den Namen "ApplicationEvents".

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert