How to tell if the app has been minimized or moved to the background #4357
Answered
by
castorix
DarrylDreiling-Sphero
asked this question in
General
-
Our application allows kids to interact with our robots. We would like to be able to stop the robot if the app is minimized or is no longer in the forefront. I have not been able to find a way to detect this. Hoping someone has some advice on how to handle this. |
Beta Was this translation helpful? Give feedback.
Answered by
castorix
Apr 19, 2024
Replies: 1 comment 1 reply
-
On Windows 10, when it is minimized, it is not in Foreground anymore
with :
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
DarrylDreiling-Sphero
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Windows 10, when it is minimized, it is not in Foreground anymore
So you can just test if it loses Foreground state, for example with Activated :
this.Activated += MainWindow_Activated;
with :