System Tray Icon Sizes

J

John Veldthuis

What sizes can the system tray icons be?

I have a utility that I display a number as an icon. I do it by using drawstring into the icon
bitmap and displaying it. It is fine as long as the number is only 2 digits but when it hits 3 the
text runs off the end of the icon and you cant see it anymore. I get around this by making the font
smaller but it makes it hard to read then.

An ideal way would be to do something like the clock does but I am unable to work out how it does
it. Any ideas? The icon I use is a 32x32 which I cut down to 16x16. Another way I thought of doing
it was to make it 24x16 and that would give me the extra width but it does not work.
 
H

Herfried K. Wagner [MVP]

John Veldthuis said:
What sizes can the system tray icons be?

16 × 16 pixels.
I have a utility that I display a number as an icon. I do it by using
drawstring into the icon
bitmap and displaying it. It is fine as long as the number is only 2
digits but when it hits 3 the
text runs off the end of the icon and you cant see it anymore. I get
around this by making the font
smaller but it makes it hard to read then.

An ideal way would be to do something like the clock does but I am unable
to work out how it does

The clock is not an icon.

You may want to use an explorer bar instead:

Extending Explorer with Band Objects using .NET and Windows Forms
<URL:http://www.codeproject.com/csharp/dotnetbandobjects.asp>

Shell Extensions with .NET
<URL:http://mvps.org/emorcillo/en/code/shell/shellextensions.shtml>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top