I have an app that is already running – every now and then it triggers a FlashWindowEx event (the windows 7 icon flashes). I would like to capture this event but I can’t seem to find any good info on how.
My thoughts were that it would go like this:
- Hook into running process using Process.GetProcessesByName
- Set up event handler for FlashWindowEx
- Catch it and do whatever
I guess my question is:
Is this possible?
- Is there a way to get a list of available events from a running process?
- How would I hook into FlashWindowEx?
The
WH_SHELLhook notifies you when a window is flashing. According to the documentation:nCode=HSHELL_REDRAWwParam= the handle of the windowlParam=TRUEif the window is flashing,FALSEotherwise.