Easily create tray icon in .NET

Today we’ll create simple tray icon app using visual basic .NET express edition. For the first step, we need to create new project. There, you’ll be given 1 form called ‘Form1.vb’. Open it and add NotifyIcon and ContextMenuStrip control from toolbox. Now here’s the trick, set the following properties into given value.


Name Form1
BackColor: Color.BLACK (select web >> black)
ShowInTaskbar: False
TransparencyKey: Color.BLACK (select web >> black)


Name NotifyIcon1
Icon: Icon image you want to use. Note : without this, your try icon will never be shown.
ContextMenuStrip: ContextMenuStrip1
Visible: True


Name: ContextMenuStrip1
Items: [menu item you want to show on your tray icon]

That’s it. You can now compile your apps and run it. Click here to download source code.

Author: Arief Bayu Purwanto

Hello, my name is Arief Bayu Purwanto, a 24 years old father of a beautiful daughter. Interested in online programming, linux, games, and reading. Currently working on kapanlagi.com as junior developer. I live in a relatively quite and cool place called Malang. I'm available for some freelance stuff as well as some consulting job. You can see my portofolio for some previous task I've finished and some other information related to my capability. Btw, I'm plurking here.