How to display an icon in the system tray?
Open the main form for your application, go to the toolbar, open the All Windows Forms section and release the NotifyIcon on your form. Then add the icon you want to NotifyIcon.
You can also change your form's ShowInTaskbar property to false when the form is minimized and handle the NotifyIcon double-click event to restore the form and return ShowInTaskbar to true.
source to share
You need to add a NotifyIcon to your Windows form and set the Icon property to the appropriate icon, set the ShowInTaskBar property of the form to false.
You might also want to handle the form's close event and hide rather than close the form; adding a ContextMenuStrip to the NotifyIcon will allow you to provide a context menu with Exit and Settings options with appropriate handlers.
source to share
Note that it covers all combinations of mouse clicks with NotifyIcon, as well as more. The code resides in the template and is driven by the project setting so you can implement the NotifyIcon logic across all your projects without any coding effort.
More details here