This documentation is archived and is not being maintained.

SystemEvents.SessionEnded Event

Occurs when the user is logging off or shutting down the system.

[Visual Basic]
Public Shared Event SessionEnded As SessionEndedEventHandler
public static event SessionEndedEventHandler SessionEnded;
public: static __event SessionEndedEventHandler* SessionEnded;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type SessionEndedEventArgs containing data related to this event. The following SessionEndedEventArgs property provides information specific to this event.

Property Description
Reason Gets how the session ended.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SystemEvents Class | SystemEvents Members | Microsoft.Win32 Namespace | SessionEndedEventArgs | SessionEndedEventHandler | SessionEndReasons