469,354 Members | 2,255 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,354 developers. It's quick & easy.

Detect logoff or shutdown

How do you detect when a system is being logged off or shutdown? In VB 6
there was a QueryUnload event that would work if you had a form, but I'm
running in a Sub Main scenario... I can't find any events to code for... Is
there a way to register with the system to be notified of the
logoff/shutdown? Thanks.

Jerry
Nov 20 '05 #1
1 1698
* "Jerry Camel" <rl*****@msn.com> scripsit:
How do you detect when a system is being logged off or shutdown? In VB 6
there was a QueryUnload event that would work if you had a form, but I'm
running in a Sub Main scenario... I can't find any events to code for... Is
there a way to register with the system to be notified of the
logoff/shutdown? Thanks.


<URL:http://dotnet.mvps.org/dotnet/samples/windowsandforms/downloads/CloseWindow.zip>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Allan Bredahl | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.