Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System tray icon 1

Status
Not open for further replies.

jcura

Programmer
Oct 18, 2002
34
0
0
PT
Greetings

Anyone know how to put a system tray icon blinking?

Thanks
Jose Cura
 
Hi,

I'm assuming you have done the work getting an icon onto the system tray.

Due to the proprietary way in which PB handles resource, the only icon which is available (easily) is the application icon. You can get that using ExtractIconA(...) or LoadIconA(...) but that's it. If you want to make a blinking (animated) icon then you will need to take a different [read: clunky] approach: create a C++ .DLL [you can use an .EXE file but that is a temptation to users] containing the icons you want to use, then use ExtractIconA(...) to get the icons out of that to display in the system tray. The main downside of this is an additional file to deploy and you will need to code some back up to display a default icon in case your icon library .dll goes missing.

Once you've done that, you can use a timer event to cycle through the icons involved in your animation.

Cheers.
 
You have to use the Shell Notify windows API to do that and u have to use a timer event to cycle through the icons....
 
There are many ICONTRAY sample programs on the internet. Assume you know how to do it.

The blinking then is reasonablly simple. All you have to do is to set a timer, and under timer event, keep change program icon. Simple like that.

Addison Lu
 
I did write the code on a timer event and it works fine. Thanks to all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top