How to detect when my app window is activated explicitly by the user
I need to know when my application is activated explicitly by the user, i.e., my application lets users open office documents, when they do that the office window becomes active and my application's window becomes deactivate. What I need to know开发者_高级运维 is when the user re-activates my application's window either by Alt+Tab or through the taskbar.
I've tried to use WM_NCACTIVATE
and WM_ACTIVATEAPP
messages but this these messages are thrown in many other situations. Is there a way I can get this information with these or other messages?
thanks, José Pedro Tavares
Why don't you use the Activated event from the form?
精彩评论