I know how to place a icon in the Windows notification area (system tray).
What is the best method to have an icon animate? Can you use an animated gif, or do you have to rely on a timer?
I'm using C# and WPF, but WinForms accepted too.
I know how to place a icon in the Windows notification area (system tray).
What is the best method to have an icon animate? Can you use an animated gif, or do you have to rely on a timer?
I'm using C# and WPF, but WinForms accepted too.
Abhinaba Basu's blog post Animation and Text in System tray using C# explains.
It comes down to:
e.g.
SetAnimationClip
uses the following code to create the animation frameTo animate the frame
StartAnimation
starts a timer and in the timer the icons are changed to animate the whole sequence.Using SysTray
Create and wire up your menu
Get an icon you want to show statically in the tray.
Create a SysTray object with all the required information
Create image strips with the animation frames. For 6 frame strip the image will have a width of 6*16 and height as 16 pixels
Start animation indicating how many times you need to loop the animation and the frame delay
To stop animation call
I think the best way to do this is to have multiple small icons which you can continue to change the systray object to the new picture based on the speed and the time.