02-07-2012 08:59 PM
Hopefully I can save someone else a little head scratching.
I'm using the NotifyIcon code from Brinoceros (https://decibel.ni.com/content/docs/DOC-10683) (two thumbs up BTW)
I couldn't figure out why my notification area icons were getting deformed. Answer was to set the size in the NotifyIcon - Set Icon.vi such as this:
Even though the file I'm using has 48x48, 32x32, & 16x16 icons in it, it looks like Cloister is absolutely correct in his post (http://www.hhhh.org/cloister/csharp/icons/) every other row/column of the 32x32 gets thrown away and what's left becomes your icon.
I finally got clued in about the size parameters from this: (http://msdn.microsoft.com/en-us/library/windows/desktop/ee330740(v=vs.85).aspx)
"Notification area icons should be high-DPI aware. An application should provide both a 16x16 pixel icon and a 32x32 icon in its resource file, and then use LoadIconMetric to ensure that the correct icon is loaded and scaled appropriately."
02-08-2012 09:25 AM
I've also found that you get better results of you use really big ICOs and let the software scale it down to 16x16. For example, I used IrfanView to create an ICO that is actually 176x176 pixels. When scaled down it looks really nice.
Mike...
04-11-2013 01:00 PM
My previous advice, while providing a great looking result in WinXP was producing poor quality in Win7. Also what I posted above looked terrible in WinXP running alternate DPI's. So after a day of messing with the size parameters and icon files, I am now using the following solution
-Do NOT specify the icon size
-Create icon files with a bunch of resolutions
While the WinXP base icon doesn't look as good as it once did, at least WinXP alternate DPI and Win7 in both std and alternate DPI, look relatively undistorted. My icon file now has 9 sizes 256,48,32,26,24,22,20,18,16. The easiest way for me to create all nine layers was to use Gimp and this advice:
from: http://regx.dgswa.com/html/Gimp+ico+how+to
sorry for raising a dead thread, but I don't like running into mis-information, so I had to fix it!