Modal Window flicker effect
See the question and my original answer on StackOverflowSee this SO question and the answer: Prevent WebBrowser control from stealing focus?
It explains what FlashWindow does in the background. I quote what's interesting for you:
Microsoft doesn't explain in so many words what FlashWindow does. Unfortunately, it doesn't send a specific message (say WM_FLASH or similar), which would've made it easier to capture and annul this behavior. Instead, FlashWindow does three things:
It sets a system timer for the flashing intervals It sends a WM_NCACTIVATE message for the first flash It sends a WM_NCACTIVATE message when the timer expires (on receiving WM_SYSTIMER)
So you'll have to find the window you're interested in, and try to catch WM_SYSTIMER in the hosting window procedure. It's a (very old) undocumented Windows message. Value is 0x118. You can also trap WM_NCACTIVATE which may be easier because it's represented by .NET events (Activated, Deactivate, etc...)