is there a way to be notified whenever a new process is started? say, i want a message to be sent to my program when a certain window pops up, for example a web browser or an explorer window. is this possible?
is there a way to be notified whenever a new process is started? say, i want a message to be sent to my program when a certain window pops up, for example a web browser or an explorer window. is this possible?
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
I'm sure it is possible since I've seen programs do it. I'm intrigued though, so give me a minute to look for an answer.
I'm not finding any specialized functions for this task, so I can only recommend using hooks. If I find anything better than I'll post it.
You can use EnumDesktopWindows to find all the processes running. If your program sets a timer for every 300 ms and enumerates the processes (or uses FindWindow if you know the title text) You can immediately respond and kill the window or do whatever you want.
-Futura