How do I Abort/Delayed Shutdown

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My app sits quitely on the system tray of a file serve, monitoring some
users' predefined files.

How can I trap the system shutdown message and display a warning.
User should be allow to abort the system shutdown/restart.

As long as those files are opened by somebody (be it locally or remotely),
my apps should gives warning.


Thank You,
mfwoo
 
Pardon my ignorance.
But I'd go through the events from the VS2003 IDE and I can't get
Form_QueryUnload events.


Thank You,
mfwoo
 
Hi,

Thanks a lot both of you.
Get it working correctly now.

However, I stil have a tiny little problem.
My apps will get iconized on window startup. If I shutdown windows now,
WM_QUERYENDSESSION doesn't get captured.
But, when I restore the apps to normal size and iconized it back, only then
WM_QUERYENDSESSION will get captured.

In short, the apps needs to get focus once, before it can capture
WM_QUERYENDSESSION.

Any ideas?

Thanks,
mfwoo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top