Is there an event or a way for my vb6 application to detect a receive focus (activate app?) and/or a lose (deactivate) app??
Thank you to all!
E
Printable View
Is there an event or a way for my vb6 application to detect a receive focus (activate app?) and/or a lose (deactivate) app??
Thank you to all!
E
Yes there is.
Suibclass the application's main window and look for the WM_ACTIVATEAPP message.
If the wParam is True, your app is gaining the focus.
If the wParam is false, your app is losing the focus.
I have written a DLL that makes this whole subclassing stuff a lot easier and it wraps this in a VB event:
public Event ActiveApplicationChanged(byval ActivatingThisApp as Boolean, byval hThread as Long, Cancel as Boolean)
Drop me a private message with an email address and I'll send it to you.
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com