I have a VB6 application which I wrote for a client that runs as a service in the background. (It detects FTP file pushes and processes the information.)
PROBLEM: The "unprofessional" looking problem is that whenever this server is re-booted or shut down for any reason, a dialog box appears saying that my program "Is not responding" and it gives a progress bar showing that the system is waiting around for it to end.
I know that the problem is caused by my application which is running on a timer. (There are no forms in my application: I am using the "SetTimer()" API function.)
I'm assuming there's an API function to detect a pending Windows shutdown event.
QUESTION: What is the miracle API function that will tell me that the Windows operating system is trying to shutdown? Or is there some other workaround?
NOTE: This application which I wrote has no forms. Solutions that involve form and closing all forms, etc... are not applicable to this problem.