wpf - Set system focus on my application -
I have an application that will mainly work in the background. I want some system events from which this causes the app to focus from the foreground app, whatever it may be, but UIElement.Focus () seems to set the focus within the WPF app, if this is the first in the WPF app Focus (Focus) sets the focus on right control, since there is a complete focus. But I need to focus from any other app and put it on my app. How can I do this?
I do not not want to make a system model dialog. That is, when the window stole the focus, it may be possible for the user to switch to another app immediately without dismissing my app's window.
The app can be restored, at least, or at least "tray" state when it needs to steal system focus so that it is possible When restoring the window it is minimized and the theft is kept in mind.
In the mind while pinning something /, the SetForegroundWindow function helps you Should be enabled in:
Comments
Post a Comment