I have a .NET application running on a Smartphone. I want a way for the application to close when it is pushed into the background.
I.e. if a user presses the off button once itll take them to the desktop. The application is still running in the background though.
I want a way to detect that the application is no longer in the foreground and exit it.
I attempted doing this via the LostFocus event but it becomes complicated when option forms are loaded and isn't always reliable.
Can anyone offer suggestions? Thanks