BLOG.CSHARPHELPER.COM: Place a notify icon in the system taskbar in C#
Place a notify icon in the system taskbar in C#
The NotifyIcon control makes this relatively easy. First place the control on your form.
At run time, set the NotifyIcon control's Icon property to determine what image it displays in the taskbar. You can also set its Text property to determine the text it displays when the user hovers over it.
This example displays two radio buttons that display happy and sad pictures. When you click one, the program displays the corresponding icon on the form and on its NotifyIcon.
The program also gives its NotifyIcon a context menu. At run time you can right-click on the NotifyIcon to open the menu and select either Happy or Sad commands.
To save code, the code uses the same event handlers for the radio buttons' and menu items' Click events.
The following code shows how this example works.
Comments