471,610 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

How to make a non square Sys Tray Icon?

I searched for a couple hours lastnight on example code of how to go
about making an item in the System Tray (notification area) not be
square. I've found several programs that do this but I can't seem to
find any documentation on how to actually get this to work.

I checked out some system messages that NotifyIcon uses thinking that I
could just make my component from scratch using these but nothing seemed
to be allowed to adjust the width of the icon.

Does anyone have any ideas? Eventually I want to have an item that
takes up two slots horizontaly, or an area like the clock - I know I can
create text by making a bitmap, drawing on it, and converting to an icon
- that's all working - but actually getting that to show up correctly is
giving me a headache.

Thanks in advance,
Benny
Jan 5 '06 #1
7 2611
Benny,

You can't do this. The icon has to be 16x16 I believe. No other size
is allowed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Benny Raymond" <be***@pocketrocks.com> wrote in message
news:uR*************@TK2MSFTNGP10.phx.gbl...
I searched for a couple hours lastnight on example code of how to go about
making an item in the System Tray (notification area) not be square. I've
found several programs that do this but I can't seem to find any
documentation on how to actually get this to work.

I checked out some system messages that NotifyIcon uses thinking that I
could just make my component from scratch using these but nothing seemed
to be allowed to adjust the width of the icon.

Does anyone have any ideas? Eventually I want to have an item that takes
up two slots horizontaly, or an area like the clock - I know I can create
text by making a bitmap, drawing on it, and converting to an icon - that's
all working - but actually getting that to show up correctly is giving me
a headache.

Thanks in advance,
Benny

Jan 5 '06 #2
Benny,

I suspect you are having trouble differentiating between image formats. The
format used in the system tray is *.ico - You need to use transparency in
your *.ico to give the icon a non-square look (as the standard windows
"volume control" icon does.) Visual Studio is capable of creating such
icons.

I think Nick is correct... the standard Win32 API does not allow for
"multi-slot" tray icons.

--
Colin Neller
http://www.colinneller.com/blog

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:en**************@TK2MSFTNGP15.phx.gbl...
Benny,

You can't do this. The icon has to be 16x16 I believe. No other size
is allowed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Benny Raymond" <be***@pocketrocks.com> wrote in message
news:uR*************@TK2MSFTNGP10.phx.gbl...
I searched for a couple hours lastnight on example code of how to go about
making an item in the System Tray (notification area) not be square. I've
found several programs that do this but I can't seem to find any
documentation on how to actually get this to work.

I checked out some system messages that NotifyIcon uses thinking that I
could just make my component from scratch using these but nothing seemed
to be allowed to adjust the width of the icon.

Does anyone have any ideas? Eventually I want to have an item that takes
up two slots horizontaly, or an area like the clock - I know I can create
text by making a bitmap, drawing on it, and converting to an icon -
that's all working - but actually getting that to show up correctly is
giving me a headache.

Thanks in advance,
Benny


Jan 5 '06 #3
If it's not possible, how are programs doing it? Check out this program
for instance:

http://www.birdcagesoft.com.au/ (click on the weather software button)

and this one:

http://www.zonetick.com/ (they have all sorts of different non standard
icons showing up)

both are completely different types of programs and both have non
standard "icons"

Nicholas Paldino [.NET/C# MVP] wrote:
Benny,

You can't do this. The icon has to be 16x16 I believe. No other size
is allowed.

Hope this helps.

Jan 5 '06 #4
I know about transparency in icons - I use it all the time - what i'm
talking about is different - please see my post RE Nicholas's post

Colin Neller wrote:
Benny,

I suspect you are having trouble differentiating between image formats. The
format used in the system tray is *.ico - You need to use transparency in
your *.ico to give the icon a non-square look (as the standard windows
"volume control" icon does.) Visual Studio is capable of creating such
icons.

I think Nick is correct... the standard Win32 API does not allow for
"multi-slot" tray icons.

Jan 5 '06 #5
Those programs don't appear to be written in .NET. You can always make a
PInvoke call to get to the unmanaged Win32 API. Try searching through the
Win32 forums or on www.pinvoke.net.

Alternatively, you could use a "toast" feature to keep the systray icon
small but popup a larger window periodically. Avalon (WPF) has very nice
support for Toast-style applications.

"Benny Raymond" <be***@pocketrocks.com> wrote in message
news:Oc**************@TK2MSFTNGP14.phx.gbl...
If it's not possible, how are programs doing it? Check out this program
for instance:

http://www.birdcagesoft.com.au/ (click on the weather software button)

and this one:

http://www.zonetick.com/ (they have all sorts of different non standard
icons showing up)

both are completely different types of programs and both have non standard
"icons"

Nicholas Paldino [.NET/C# MVP] wrote:
Benny,

You can't do this. The icon has to be 16x16 I believe. No other
size is allowed.

Hope this helps.


Jan 5 '06 #6
Benny,
both are completely different types of programs and both have non
standard "icons"


I don't think those are icons at all, but rather windows parented in
the notification area beside the toolbar holding the regular icons. In
other words it's a hack and not something supported through any API.

Do you have to place your GUI thingy in the notification area?
Wouldn't a supported extensibility way such as a desk band be an
option?

http://msdn.microsoft.com/library/en..._adv/bands.asp
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jan 5 '06 #7
I was about to write a simular response - after taking a quick look
through the pinvoke website I still couldn't find a way of doing it. I
guess doing a bad would be a friendlier way of doing this, however I
wanted my item to work as if it was a notification icon but take up 2
spaces instead of the normal 1 space. Perhaps I'll look a little more
into how to actually get a control to show up in the notification area
then then give up in a few weeks ;)

~benny

Mattias Sjögren wrote:
Benny,

both are completely different types of programs and both have non
standard "icons"

I don't think those are icons at all, but rather windows parented in
the notification area beside the toolbar holding the regular icons. In
other words it's a hack and not something supported through any API.

Do you have to place your GUI thingy in the notification area?
Wouldn't a supported extensibility way such as a desk band be an
option?

http://msdn.microsoft.com/library/en..._adv/bands.asp
Mattias

Jan 5 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mats-Lennart Hansson | last post: by
5 posts views Thread by BJ | last post: by
8 posts views Thread by george d lake | last post: by
3 posts views Thread by Stanley | last post: by
8 posts views Thread by Avi G | last post: by
1 post views Thread by =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by MichaelMortimer | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.