wpf - Closing a window when it's "no longer needed" -


This is a difficult question to describe, and I have not searched for about an hour.

Basically, from the System Tray (Information Area), portray a small 'flyout' window like Windows 7 wireless control or volume slider. When you click on the icon, the application pops up with focus, and if you close it, the window destroys itself.

I thought that it can easily be solved after destroying my window, it loses focus (I'm listening to WM_Cilfocus), but the problem is that if the icon If the click is done, my window does not always focus because this is not the case, if the user clicks on my icon, and then clicks away because it was a mistake (on desktop say), how can I I can make your app set to Nd?

Tried to mess with Spy ++, but checking volume control / wireless control apps is proving difficult because when I handle their window / process, they disappear .

Thank you!

This is the usual way to start a timer on window construction. If the timer is focused before the window is triggered, it means that the user has interacted with the window. In this case, the window will close the timer and destroy itself when it loses focus, in case the window was not ignored before the window was triggered, the window automatically destroys the timer event.

This is usually combined with ambiguity animation, so that window streak is waiting for the user to wait according to the user's visual feedback, though it will run soon, however, the ambiguity animation is mostly notified , And it is rarely used for control control such as volume controls.

The option is forced to set the focus in your window when the user has your system icon

Also keep in mind that if your window is a top-level window, the preferred message to listen to is WM_KILLFOCUS , but no more.

Updates : You can set the focus on your window by calling, you can also listen, but there are some specifications in it, if you are doing a custom non-client area Are there. Either on it or when you make it (or when you see it, you are hiding it).


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -