469,578 Members | 1,883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Detect Log Off or Shut Down process (XP)

Hi there,

I created a simple VB app that runs in the background that I now need to
detect when Windows (XP with SP2) is just about to Shut Down OR the user is
Logging Off. Is this possible?
I require my app to either pause the shutdown/log-off process for a few
seconds whilst it does something important (it's a security thing). As soon
as its finished, Windows should resume logging off the user and/or shutting
down.
Thanks in advance.

Jason.
Feb 17 '06 #1
2 11615
Jason S wrote:
Hi there,

I created a simple VB app that runs in the background that I now need to
detect when Windows (XP with SP2) is just about to Shut Down OR the user is
Logging Off. Is this possible?
I require my app to either pause the shutdown/log-off process for a few
seconds whilst it does something important (it's a security thing). As soon
as its finished, Windows should resume logging off the user and/or shutting
down.


Just do it in the shutdown code of your app?
Windows will wait patiently (up to a point) for your app to finish.
The QueryUnload event will tell you why its shutting down.

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems
Feb 17 '06 #2

"Dean Earley" <de*********@icode.co.uk> wrote in message
news:43**********************@news.zen.co.uk...
Jason S wrote:
Hi there,

I created a simple VB app that runs in the background that I now need to
detect when Windows (XP with SP2) is just about to Shut Down OR the user
is Logging Off. Is this possible?
I require my app to either pause the shutdown/log-off process for a few
seconds whilst it does something important (it's a security thing). As
soon as its finished, Windows should resume logging off the user and/or
shutting down.


Just do it in the shutdown code of your app?
Windows will wait patiently (up to a point) for your app to finish.
The QueryUnload event will tell you why its shutting down.

--
Dean Earley (de*********@icode.co.uk)
i-Catcher Development Team

iCode Systems

Thanks. I never actually sussed out the QueryUnload event to be honest.
Works! =)

Jason.
Feb 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Stephane Belzile | last post: by
reply views Thread by John Winterbottom | last post: by
4 posts views Thread by Claire | last post: by
5 posts views Thread by Anders Both | last post: by
4 posts views Thread by Harri Pesonen | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.