What is the size of the icons in the system tray?

Nam G VU picture Nam G VU · Aug 20, 2010 · Viewed 26.1k times · Source

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!

Answer

Quppa picture Quppa · Jan 6, 2011

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.)

Microsoft recommends including 16x16 and 32x32 pixel icons.