Hi,

Is there a way to detect if the computer is attempting to shut the system down, log off or restart?

I have some API's but I don't know how to use them really...

What I need to do, is for my program to detect if an application is trying to shutdown, log off or restart and cancel it straight away.

Then I can ask the user what to do basically; accept it or refuse it.

Thanks for the help, I really appreciate it.