Tip #2 for the day. This one isn't very solid but based on what I've noticed.
If you set an icon for the notification area that has anything other than a 16x16 image in it, Windows will try to use one of the large versions in the icon file and scale that down to 16x16. Now, this is when you have your font size set to small, in other words the DPI setting is 96 DPI. The scaled down image usually looks pretty bad. So the solution is to use an icon with only 16x16 versions in it.
The problem with this is that the 16x16 image will get scaled up if you have a higher DPI such as 120, again looking bad. So, I hacked it by checking if the DPI is 96 and using either an icon with 16x16 only or with 32x32 included. Works great on Vista (where the OS actually looks good with a higher DPI), haven't tried with XP since I'm not in the mood to reboot right now and once I do test it I won't remember to update this post.
The code I used for testing the concept:
// Check if we have the default 96 DPI setting in the OS, otherwise use 32x32 image for better scaling
System.Windows.Forms.Panel tempPanel = new System.Windows.Forms.Panel();
System.Drawing.Graphics g = tempPanel.CreateGraphics();
if (g.DpiX == 96 && g.DpiY == 96)
{
_nIcon.Icon = Properties.Resources.Icon16;
}
else
{
_nIcon.Icon = Properties.Resources.Icon32;
}
g.Dispose();
7ed14d90-d700-4d02-924b-7e7b6f9b0ca8|0|.0