Autor Beitrag
Holgerwa
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 325

WIN XP Pro, Vista Business
Delphi 7 Pro, BDS 2006 Pro
BeitragVerfasst: Mo 08.10.07 19:59 
Hallo,

in einer Anwendung werden in der FormClose Methode der Hauptform einige Funktionen ausgeführt. Das funktioniert auch, wenn die Anwendung normal beendet wird.
Läuft die Anwendung allerdings, und Windows wird beendet, so wird scheinbar FormClose nicht aufgerufen.

Warum ist das so?
Welcher Unterschied besteht zwischen dem normalen Beenden einer Anwendung und dem, was Windows beim beenden macht?

Danke!
Holger
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 08.10.07 20:12 
Such mal nach WM_QUERYENDSESSION und WM_ENDSESSION. Das sind die Messages, die deine Anwendung bekommt, wenn Windows runterfährt. Auf diese Nachrichten musst du reagieren.

_________________
We are, we were and will not be.
Holgerwa Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 325

WIN XP Pro, Vista Business
Delphi 7 Pro, BDS 2006 Pro
BeitragVerfasst: Di 09.10.07 07:20 
Hallo Gausi,

danke für die Hinweise, das seh ich mir an.

Holger
TProgger
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 148

XP
D6, D2007 prof
BeitragVerfasst: Di 09.10.07 08:07 
Ich habe schon öfters gelesen, dass FormClose nicht immer durchlaufen wird, aber FormCloseQuery wird immer durchlaufen. Dort könnte man wichtige Sachen, die vorm Beenden noch gemacht werden müssen, reinschreiben.