Cause form to blink different colors within the task bar?

  • Thread starter Thread starter Jon Pope
  • Start date Start date
J

Jon Pope

Many of my users have their sound cards muted, so I need some way of
alerting them visually that a message box has appeared on a form that could
be hidden beneath other open applications. I've noticed that whenever I
receive a message from within MSN Messenger, the chat window blinks for a
few seconds within the task bar. This functionality would be ideally suited
for my app.

Is there an API which I can use to allow similar functionality within my
app?


Cheers, Jon
 
Jon,

Yes, there is. You can call the FlashWindow/FlashWindowEx APIs through
the P/Invoke layer to flash the window. However, you can not make it blink
different colors. You can only make it flash the system-defined color.

Hope this helps.
 
FlashWindowEx appears to be just what I need. However, after reviewing MS's
online documentation I'm stumped as to how to declare the following
structure:

typedef struct {
UINT cbSize;
HWND hwnd;
DWORD dwFlags;
UINT uCount;
DWORD dwTimeout;
} FLASHWINFO,
*PFLASHWINFO;

which I pulled from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/flashwinfo_str.asp

How would you recommend I declare and supply this structure to
FlashWindowEx?

Thanks for your help,

Jon


Nicholas Paldino said:
Jon,

Yes, there is. You can call the FlashWindow/FlashWindowEx APIs through
the P/Invoke layer to flash the window. However, you can not make it
blink different colors. You can only make it flash the system-defined
color.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jon Pope said:
Many of my users have their sound cards muted, so I need some way of
alerting them visually that a message box has appeared on a form that
could be hidden beneath other open applications. I've noticed that
whenever I receive a message from within MSN Messenger, the chat window
blinks for a few seconds within the task bar. This functionality would
be ideally suited for my app.

Is there an API which I can use to allow similar functionality within my
app?


Cheers, Jon
 
Back
Top