is there any easy way to display animated gif in sys tray ?
or do i have to draw a simple picture/shape using GDI ?
Printable View
is there any easy way to display animated gif in sys tray ?
or do i have to draw a simple picture/shape using GDI ?
As the name suggests, the NotifyIcon displays an Icon. If you want animation then you would intermittently change the Icon that is displayed. An animated GIF is simply a set of frames that get displayed on after the other. You can do that manually with multiple Icons. You could even derive your own custom NotifyIcon that allowed you to set a collection of icons and an interval and will then change its own Icon.
Apparently NotifyIcon is NotInheritable so you can forget that last suggestion.
actually i was looking for something like this :
http://www.vbforums.com/showthread.p...ighlight=clock
but not that complicated, i dnt want to write huge code for GUI , whtever i can do in design mode is good.
And what does that project do? It creates a NotifyIcon and changes the Icon at run time, exactly as I said. How the icons are created is irrelevant to that fact. If you want to draw the Icons yourself then by all means do so.
ok sorry for not explaining in details earlier...here it goes...
my little tool launches a url in new IE window when i click a button & waits till the page is loaded , so i simply wanna animate the systray icon i have added till the page is completely loaded.
According to u wht shud the eaisiest way to do that ? do i add series of icons in my resources & keeps them changing sequentially in a loop adding a delay, or is there a better way u can think of , like a said i do not want a too complicated code for this since i need to keep the file size in KB's & the tool is not that big in itself .
thx already ! =)
Add the Icons on the Resources page of the project properties. Add a Timer to your form with the appropriate Interval. Code like this:vb.net Code:
Private icons As Icon() = {My.Resources.Icon1, My.Resources.Icon2, My.Resources.Icon3} Private iconIndex As Integer = 0 Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick Me.iconIndex = (Me.iconIndex + 1) Mod Me.icons.Length Me.NotifyIcon1.Icon = Me.icons(Me.iconIndex) End Sub
awesome ... u saved by coding time for that jmcilhinney
thx a ton :wave: