I have a program that sits in the background and waits for certain events to occur. The program works fine, only until the user tries to log off or shutdown the system. Whenever the logoff/shutdown event occurs, a message box pops up saying that "XY Program Not Responding .... End Now?". However I want to capture the logoff event in my program, so that I can end my program as soon as the logoff event is initiated.
An immediate help would be appreciated.
Thanks in advance