Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I be notified when a new window is created or popup window is arised using hook and WinApi?
Posted

1 solution

You'd do this by implementing the CBTHook. Though, this will notify you of ANY window being created, destroyed, moved, minimizing, maximizing, resize, ...

Read these[^]...
 
Share this answer
 
Comments
KAUTIKPATEL 25-Nov-13 0:12am    
Your given link open only google page
Dave Kreskowiak 25-Nov-13 0:39am    
Yep. This is where you start doing all kinds of research on the subject so you learn something.

This is NOT where I direct you to a code sample that you can copy'n'paste into your own project.
Sergey Alexandrovich Kryukov 25-Nov-13 1:31am    
I'm afraid it won't work with C# or VB.NET. As far as I know if the hook is global, it should be installed in a native DLL. So OP would also need to use some language targeting native Windows API.
(5ed.)
—SA
Dave Kreskowiak 25-Nov-13 8:16am    
There's a MSDN article on it, albeit pretty old!, at http://msdn.microsoft.com/en-us/magazine/cc188966.aspx.
Sergey Alexandrovich Kryukov 25-Nov-13 10:00am    
Thank you for sharing. This article focuses only on local hooks though.
The problem I mention is related only to global hooks.
—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