I want to change the notification icon of my application but don't know what is the size so as to make it properly displayed. Currently it is automatically resized and break my pixels! Please help!
Asked
Active
Viewed 3.1k times
7 Answers
13
In fact the size of the icon will vary according to the system DPI.
WPF exposes the recommended pixel width and height of small icons with SystemParameters.SmallIconWidth and SystemParameters.SmallIconHeight. (WinForms exposes the equivalent SystemInformation.SmallIconSize - both just wrap around GetSystemMetrics and SM_CXSMICON/SM_CYSMICON.)

Quppa
- 1,841
- 20
- 18
-
2Good info. I made a hand-drawn 16x16 icon, with "sharp" edges (no aliasing) and it doesn't really look right in my system tray. It's just barely shrinking it, probably by 2 to 4 pixels. Not sure there's any solving this, except to add some aliasing. – Abacus Jun 27 '14 at 20:58
-
After changing dpi I still get the same (16). [My question](https://stackoverflow.com/questions/68352927/systemparameters-smalliconwidth-returns-16-on-any-dpi-so-how-can-i-check-for-ac). – ispiro Jul 12 '21 at 19:31
12
It's 16x16. If you create a .ico file that supports 16, 32, 48 and 256 sizes, you're covered.

Android Eve
- 14,864
- 26
- 71
- 96
-
2
-
basically you create a .ico at 256x256 and it will be scale down automatically by the OS – Jose De Gouveia Jul 21 '22 at 09:19
-
icon sushi is a free tool to create .ico files from appropriate pngs. Add them in order of size, 256, 48, 32, 16. – AyCe Feb 13 '23 at 15:00
1
I believe it has always been 16x16, but at some point between 98 and XP (Maybe it was CE vs NT?) they learned to support full color and alpha transparency. If you can, try to include a 256 color palleted version in the ICO for safe mode if not older versions of Windows.

YotaXP
- 3,844
- 1
- 22
- 24