I want to create an application that closes one of it's window when the user clicks on another application (or in other words the application loses focus or inactive). All the windows in my application to have the property TopMost = true
.
How I can do that?
your help is greatly appreciated.
Edit (Update):
I need when I click on another window in my application, the window is not closed. Only when my application loses focus (the user clicks on another application), the window will be closed.