Detect windows shutdown and user logoff
C#
3
Posts
2
Posters
0
Views
1
Watching
-
It is possible to do this from within a window.forms app, display some kind or message, and then cancel the action? I need to prevent the user from inadvertly shutting down/logging off unless they are sure they wish to stop my app from running. Thanks in advance.
-
It is possible to do this from within a window.forms app, display some kind or message, and then cancel the action? I need to prevent the user from inadvertly shutting down/logging off unless they are sure they wish to stop my app from running. Thanks in advance.
Take a look at the
Microsoft.Win32.SystemEvents
class. It has events for this. Regards, mav -
Take a look at the
Microsoft.Win32.SystemEvents
class. It has events for this. Regards, mavThat looks like the baby! Many thanks