I am trying to create a very simple system tray icon that is nothing but a dynamically colored circle with a white border. To do that, we are using the Webdings font. "n" in Webdings is just a plain circle.
What I'm currently doing is almost there, but on some PC's (yet not all) it ends up having a choppy, ugly black border around it:
Here's what I've got:
protected static Icon GetTrayIconFromCache(Color statusColor)
{
Bitmap bmp = new Bitmap(16,16);
Graphics circleGraphic = Graphics.FromImage(bmp);
circleGraphic.DrawString("n", new Font("Webdings", 12F, FontStyle.Regular), Brushes.White, -3f, -2f);
circleGraphic.DrawString("n", new Font("Webdings", 9F, FontStyle.Regular), new SolidBrush(statusColor), 0f, -1f);
Icon ico = Icon.FromHandle((bmp).GetHicon());
return ico;
}
No matter what I try, I can't get rid of those ugly black dots around the outside of the circle. They don't show up for everyone.... some of the developers don't see it and it looks crisp and clean. We've not yet figured out what the commonality is between those PC's where it looks good and where it doesn't.
But... is there a better way to do this?