|
-
Sep 25th, 2001, 03:59 PM
#1
Thread Starter
Hyperactive Member
Api Genius!!! This Is Going To Take Mad Skills
I am trying to develop an application that responds when the active window is changed. This means if any window becomes the foreground the window and any window stops being the foreground window, it reacts.(I do not want to use a timer in any way) I tried using subclassing with wm_activate and wm_activateapp. Am I doing something wrong, or do those only respond when your form is actived or deactived? Secondly, I was told that through use of the API call setwindowshookex, I could successfully track whenever the active window is changed. How would I go about doing this? I would need to execute it on the global scale to track all of windows, but what hook would signify a change in the foreground(active) window. I thank you for any help that can be given. Good luck.
Sincerely,
Joe
-
Sep 25th, 2001, 04:12 PM
#2
You want a sytem-wide hook. I hope you like rebooting completely locked systems - a lot.
See this thread for a dll reference -
http://www.vbforums.com/showthread.p...ht=system+hook
-
Sep 25th, 2001, 04:16 PM
#3
Thread Starter
Hyperactive Member
Thank you but....
I need to know what I must use along with the system hook to determine if the active window is switched. I have never done hooks, so I have no clue how to use them. Secondly, if it is that risky to use the hook, can you suggest another method of tracking when the active window is changed? I am open to any suggestion that does not include a timer. Thank you for your help.
Joe
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
|