Results 1 to 2 of 2

Thread: Windows will not shut down with app running.

  1. #1
    Red Rush-In
    Guest

    Windows will not shut down with app running.

    I am working on a program that runs in the system tray. I have been told by people that have run the program on Windows 98 that if it is running, Windows will not shut down unless they close the program first. I am using XP and do not have this problem.

    I'm using a timer control that is continuely running so I am assuming that this is the cause of the problem. I have thought about using the GetTickCount function instead and just run it in a loop.

    Has anybody seen this problem before and know how to solve it? Do I need to make a API call to see if Windows is trying to shut down? If so what function would I need to use?

  2. #2
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352
    The way I tracked if windows was shutting down was by using the queryunload event of your form. When you look in the query unload, one parameter is UnloadMode. If it is equal to 2(vbappwindows is the constant I believe) windows is trying to shutdown, include your shutdown feature. Hope this helps. If you need an example reply.


    Joe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width