473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Cause form to blink different colors within the task bar?

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
Nov 17 '05 #1
4 10978
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]
- mv*@spam.guard.caspershouse.com

"Jon Pope" <jo******@healthlinkinc.com> wrote in message
news:uf**************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
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/de...hwinfo_str.asp

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

Thanks for your help,

Jon
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:e2**************@tk2msftngp13.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Jon Pope" <jo******@healthlinkinc.com> wrote in message
news:uf**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #3
Jon Pope wrote:
FlashWindowEx appears to be just what I need. However, after reviewing
MS's online documentation I'm stumped as to how


http://www.pinvoke.net/default.aspx/...hWindowEx.html

Perhaps that will help...
--
Chris Priede (pr****@panix.com)
Nov 17 '05 #4
What an awesome resource. Thanks for pointing me to it!

Thanks, Jon

"Chris Priede" <pr****@panix.com> wrote in message
news:el**************@TK2MSFTNGP14.phx.gbl...
Jon Pope wrote:
FlashWindowEx appears to be just what I need. However, after reviewing
MS's online documentation I'm stumped as to how


http://www.pinvoke.net/default.aspx/...hWindowEx.html

Perhaps that will help...
--
Chris Priede (pr****@panix.com)

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steve Hall | last post by:
Dear All We have a SQL Server 2000 BE on a Win 2K Server box. Access 2000 clients, running on Win 2000 Pro. Front end design is fairly straight forward - 5 different "record types" (split...
1
by: Just Me | last post by:
Table A contains a list of colors (example red, blue, green) Table B contains a variation of the colors in Table A (example light-red, medium-red, dark-red) To add a color variation to Table...
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
19
by: Oliver Neumann | last post by:
Hello, im new to c# and i got an app with a notifyicon. Now i want to start the app only with the notifyIcon, so that the Main-Form doesnt show up. The form itself is used at the entrance...
104
by: Colin McGuire | last post by:
Hi, is there a way to show a form without a titlebar (and therefore no control box/minimize box/title etc) but still have it appear looking like 3D? The property FormBorderStyle to None - this...
2
by: Rich | last post by:
Can a vb.net form contain a subform? If yes, how is this done? Maybe I am going about my issue the wrong way. I start an asynchronous procedure from my main form - invoke a routine on a...
3
by: EnglishMan69 | last post by:
Hello All, I am using VB2005 Beta 2 in VS 2005 and am running into a small problem. I need to be able to add a picture box to the main form from within a thread. The program goes to a web...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
6
by: Hulm1 | last post by:
I am looking to prevent a form closing and pop up an error message if one or more fields in a related form isnull. I have a Main Form called "Job". In this main form is a subform called "JobTask"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.