Well you can't without some pretty severe Win32 hacking... how often do you
see this, after all?
However, you could use GDI+ to draw the icon, either using a tiny font (and
abbreviations!), or by writing a scrolling marquee implementation... noddy
(colour changing) example follows, but I haven't tested it much : it might
leak like a sponge for all I know!
using System;
using System.Windows.Forms;
using System.Drawing;
class Program {
static Random rand = new Random();
static Icon GetIcon() {
using (Bitmap bmp = new Bitmap(32, 32)) {
using (Graphics g = Graphics.FromImage(bmp))
using (SolidBrush sb = new SolidBrush(Color.FromArgb(255,
rand.Next(255), rand.Next(255), rand.Next(255)))) {
g.FillEllipse(sb, 0, 0, 30, 30);
}
return Icon.FromHandle(bmp.GetHicon());
}
}
static void UpdateIcon(NotifyIcon ni) {
Icon old = ni.Icon;
ni.Icon = GetIcon();
if (old != null) old.Dispose();
}
static void Main() {
using (Form f = new Form())
using (Timer t = new Timer())
using (NotifyIcon ni = new NotifyIcon()) {
ni.Visible = true;
t.Interval = 1000;
t.Tick += delegate { UpdateIcon(ni); };
f.Load += delegate { t.Start(); };
f.FormClosing += delegate { t.Stop(); };
f.ShowDialog();
}
}
}