Re: Windows\App shut down? (OT?)

Peter Osucha <[email protected]> Wed, 2 Jan 2008 16:13:28 -0500
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
Thank you, Peter.  Exactly what I'm looking for.  Now to try to handle
that event...

Peter

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Peter Ritchie
Sent: Wednesday, January 02, 2008 3:49 PM
To: [email protected]
Subject: Re: [DOTNET-WINFORMS] Windows\App shut down? (OT?)

At the the Windows layer an application (or more specifically the
application's message pump) is sent WM_QUERYENDSESSION and WM_ENDSESSION
message when a user is attempting to and accomplishing shut down.

In .Net the same is accomplished via the
Microsoft.Win32.System.Events.SessionEnding and .SessionEnded events [1]

[1] http://msdn2.microsoft.com/en-
gb/library/microsoft.win32.systemevents.sessionended(VS.80).aspx