Re: Notification of WIndows Shutdown.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"PeterD" <peter2@xxxxxxxxxx> wrote in message news:4o6tn3lfkgo2sl3je478hug3ka9a7aqsod@xxxxxxxxxx

Any easy VB6 way to trap a Windows shutdown? I tried the
unload functions for the form, but they don't reflect (or my test
didn't show it) that it was a Windows shutdown and not an
application derived shutdown.

Have you tried checking the UnloadMode parameter in the Form's QueryUnload event? Here are the values:

0 The user chose the Close command from the Control menu on the form.
1 The Unload statement is invoked from code.
2 The current Microsoft Windows operating environment session is ending.
3 The Microsoft Windows Task Manager is closing the application.
4 An MDI child form is closing because the MDI form is closing.
5 A form is closing because its owner is closing.

Mike


.



Relevant Pages

  • Re: Notification of WIndows Shutdown.
    ... The Unload statement is invoked from code. ... The current Microsoft Windows operating environment session is ending. ... The Microsoft Windows Task Manager is closing the application. ...
    (microsoft.public.vb.general.discussion)
  • Re: Notification of WIndows Shutdown.
    ... application derived shutdown. ... The Unload statement is invoked from code. ... The current Microsoft Windows operating environment session is ending. ... The Microsoft Windows Task Manager is closing the application. ...
    (microsoft.public.vb.general.discussion)
  • Re: Notification of WIndows Shutdown.
    ... application derived shutdown. ... The Unload statement is invoked from code. ... The current Microsoft Windows operating environment session is ending. ... The Microsoft Windows Task Manager is closing the application. ...
    (microsoft.public.vb.general.discussion)
  • Re: Notification of WIndows Shutdown.
    ... The Unload statement is invoked from code. ... The current Microsoft Windows operating environment session is ending. ... The Microsoft Windows Task Manager is closing the application. ...
    (microsoft.public.vb.general.discussion)
  • Re: Energy Discussion Part 1
    ... >> that interior walls of homes are almost never insulated. ... >> through the windows. ... If a room is un-used, rather than closing it off, I ... > the rooms because closing them off will affect the heated air thermals ...
    (misc.news.internet.discuss)