Animated status icon?


I’m making a tool that will only have an icon onto which the user will drop a file. Then some magic should happen.
While the tool is processing the file, I’d like the program icon to show something is happening.
Does anyone know a good way to do this?



Which platform?

For desktop app you can use a canvas and react on the various drag events. This includes a redraw of the canvas.

Use a timer thaat will load an icon (different) every 10 / 15 / … / 30 seconds ?

Greg, Windows & Mac.
Emile, do you know how to change the program icon at runtime? I did find this info, but maybe I’m missing the obvious.


Never saw such a behaviour on OS X, Linux or Windows (and i am glad the Icons stay as they are…). :slight_smile:

Several of the apps I use present a progress bar on the icon.

Mail doesn’t “animate” but it definitely updates the unread counters
I’ve seen others do this kind of thing

Check out the Xojo documentation, there’s a way to get a graphics object from the Dock icon, to which you can then draw on top of.

It is extremely simple on Mac with

Here is for instance a quick test I did in a button with two pictures front and back of a card :

[code]Sub Action()
static cardface as boolean

cardface = not cardface

if cardface then
app.DockItem.Graphics.DrawPicture(cardback,0,0,1024,1024,0,0,cardback.width, cardback.height)
app.DockItem.Graphics.DrawPicture(king,0,0,1024,1024, 0, 0, king.width, king.height)
end if
End Sub

In Windows that may be possible with declares on the taskbar icons, but yet, handling the dropping of things on top of taskbar icons is not built in Windows either. I would try a plain box borderless window the size of a Windows icon instead.

Oh. I thought we are talking about an Icon on the Desk, not in the Dock or Taskbar. :slight_smile: