-1

Many dekstop apps have this, such as dropbox (windows version). You right-click the dropbox systray icon and there are shortcuts to the features of the main app.

Right now, I want to keep it simple and just want to run a exe(?) and have a custom icon appear in the system tray notification area. How do I build this?

Bart van Ingen Schenau
  • 71,712
  • 20
  • 110
  • 179
Level1Coder
  • 131
  • 6

1 Answers1

3

The System Tray/Notification Area is a feature of Windows Explorer shell, and is exposed as part of the Windows Shell SDK, which can be accessed on MSDN. The Shell SDK exposes a set of C-style functions that can be called from any programming language capable of calling C-style functions. This includes C++, C#/VB.NET (through P/Invoke) and probably most other common languages, though these are the ones I'm familiar with.

Specifically, you'll be wanting to call the Shell_NotifyIcon function. You can either call it directly through the methods I mentioned above, or use one of the common wrappers you'll find in most frameworks. .NET WinForms has the NotifyIcon class which wraps the Shell SDK calls within it. A quick google-search shows that people have built similar wrappers for Python, and Java has a wrapper similar to .NET's, as of Java 6.

Shouldn't be too complicated to implement in the programming language of your choice.

Avner Shahar-Kashtan
  • 9,166
  • 3
  • 29
  • 37