|
-
March 28th, 2001, 03:54 PM
#1
App Detection of Receive or Lose Focus
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
Elizabeth
-
March 30th, 2001, 04:27 AM
#2
Re: App Detection of Receive or Lose Focus
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|