Jump to content

mahris

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. mahris

    Detect Windows shutdown?

    No need to trigger WM_QUERYENDSESSION yourself, Delphi already does it in Forms.pas: procedure TCustomForm.WMQueryEndSession(var Message: TWMQueryEndSession); begin Message.Result := Integer(CloseQuery); end; So, do your actions in standard OnCloseQuery. Note. In my Windows 10, on shutdown I receive OnCloseQuery. but not OnClose (WM_CLOSE).
×