Tutorial: How to work with the System Tray from .Net

posted on June 2, 2008 by Karl

After I released the System Tray tile for the Sidebar, I’ve had quite a lot of PMs and emails regarding interacting with the tray from .Net. So I’ve written this short tutorial for you all to go through to help with any difficulties you might have been having. It’s written with C# source code.

How to work with the System Tray from .Net (PDF)

13 Comments

Andrew Powell said on June 2, 2008 at 6:58 am:

For anyone who has dabbled in the alternative shell world, with a this should also allow you to create an application which acts as the system tray itself, without explorer running.

Edootjuh said on June 2, 2008 at 10:22 am:

Thanks! Great tutorial, but are you still planning on telling us how to resize the taskbar and change its layout? :)

Ttierro said on June 3, 2008 at 1:28 am:

YAY! Thanks a lot but eh… I VB.Net… not C#

Ah heck, I’ll translate, I can.

Tierro said on June 3, 2008 at 1:37 am:

Ah, I’ve done similar things before when controlling window states… Does anyone mind if I translate this tut to VB?

Bryant said on June 3, 2008 at 7:35 am:

Tierro, go for it man. I’ll add it to the front page once you’re done.

huh said on June 4, 2008 at 3:57 am:

Why not use Shell_NotifyIcon()

huh said on June 4, 2008 at 4:01 am:

nice job but win32 already has a function that does almost all the dirty work for you..

http://www.webtropy.com/articles/art9-1.asp?f=Shell_NotifyIcon

Karl said on June 5, 2008 at 2:50 am:

Shell_NotifyIcon doesn’t do anything this tutorial is about. It doesn’t give you information about current SysTray icons.

Patrick G. said on June 5, 2008 at 5:39 am:

Wow thanks for this Karl. i asked you a few times and tought you have forgot. 1000 times Thank you for this tutorial..

I have already translated this Tutorial to VB so if anyoned needs it message me.

“patrickgs” on aeroxp
patrickgs21@googlemail.com

geeq said on June 20, 2008 at 2:45 pm:

Hello,

Patrick G. or anyone could you pls send me or post the vb.net code of this? Since i’m getting error converting it.

Thanks;

Josh said on January 3, 2009 at 3:30 am:

Hi,

I’m new to all this but looking to do something similar. Can you pls provide a full source listing? I’m having trouble trying to get it working (as in, I’m missing a lot of details because I don’t understand). Thanks.

Josh said on January 4, 2009 at 4:35 am:

Ok, I think I’ve managed to figure most of the missing pieces out. What’s the terms of your source code? I’d like to use it for a public made freely available plugin for Find and Run Robot. I’ve had to adjust a few data types to get it running, but I think it’s still safe(ish) :) If I can use it, what credit towards it would you like? Credit in the source and plugin?

Leave a comment