I have an app that sits in the system tray.
My problem is that when a user logs off when the app is still running, because the app is still running, they can't log off.

Is there a way in my app, to close the app when someone is logging off?

any help would be appreciated.