JoshyFun wrote: > In Windows world you must handle the WMQueryEndSession message, I had > done it in Delphi in the past but never in Lazarus. You can try this > Delphi snippet http://delphi.about.com/cs/adptips2000/a/bltip0500_4.htm > Application.OnEndSession executes by this message. Best regards, Paul Ishenin.