Link to home
Start Free TrialLog in
Avatar of TechMonster
TechMonster

asked on

VB.net 2003 **Hooks to get last application with focus

I have found a few posts by IDLE MIND and IMRAN.  Idle Mind had a good code which works with VB6. Unable to find now.  He used Shell scripts to complete.  

****************************************************
Intercepting WM_ACTIVATE message for any window (detecting activation with hooks/subclassing)

https://www.experts-exchange.com/questions/21083100/Intercepting-WM-ACTIVATE-message-for-any-window-detecting-activation-with-hooks-subclassing.html

uMsgNotify = RegisterWindowMessage("SHELLHOOK")

    ' This basically registers our window to receive the shell events
Call RegisterShellHookWindow = (Me.Handle)
**************************************************
UMsgNotify has an error that it expects a declaration
Call states Syntax error.

I have another open question just as this one.. Just looking for a solution.
Help.  Help Help!  
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial