Click here to Skip to main content
15,916,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey there is any way to to triggered event when any application in computer is created/destroyed and activate/deactivate.


Like Global keyhook and global mousehook.
Posted

1 solution

As to the process starting and termination events, please see this CodeProject article: Hooking the native API and controlling process creation on a system-wide basis[^].

As to activation and deactivation, it's not clear what do you mean. A window can be activated and deactivated; and this could be a subject of global window hook. If this is what you are looking or You can use the hook type WH_GETMESSAGE and track the event when a window gets message WM_ACTIVATE:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646274%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644959(v=vs.85).aspx#whgetmessagehook[^].

—SA
 
Share this answer
 
v2
Comments
BharatPrajapati212 9-Sep-14 5:21am    
Thanx "Sergey Alexandrovich Kryukov"
Sergey Alexandrovich Kryukov 9-Sep-14 11:34am    
You are welcome. Will you formally accept the answer (green "Accept" button)?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900