Using class NotifyIcon to create a TaskBarTray Icon for the Application

NotifyIcon NI=new NotifyIcon();NI.Icon= ;NI.ContextMenu= ;NI.Text= ;NI.Visible=true;

DevPro Staff

April 16, 2004

1 Min Read
ITPro Today logo

NotifyIcon NI=new NotifyIcon();

NI.Icon=;

NI.ContextMenu=;

NI.Text=;

NI.Visible=true;

 

Important:
After setting it, make sure to set NotifyIcon.Visible=true.


Also, can get an Icon via doing: NotifyIcon1.Icon=this.Icon;
(this=the Form)

 

Class NotifyIcon has several Events which the user can add EventHandlers, and respond to, such as Click, DoubleClick, MouseDown, MouseMove, & MouseUp.

 

A Common use to when the NotifyIcon is clicked,

is to open the Application's Main Form.

A Common use to when the NotifyIcon is rightclicked,

is to show a conetxt menu with options relevant for the application, or to what the notifyicon represents.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like