Introduction
In Windows there is a Taskbar with a Notification area (historically known as the system tray or status area) with icons. Typically in the bottom-right a notification icon notifies the user of certain information.
Example: we generally have some software installed in our machine and we periodically get the following notifications.![]()
![]()
We can create a notification icon using C# Windows Forms as per requirements.
The following is a snapshot of an notification icon that pops up when the user starts the application.![]()
Procedure
- Add a Windows application

- Add a NotifyIcon as in the screen below.

- the following control will be added (notiyicon) to the application:

- Add the following code to the form:
- protected void Displaynotify()
- {
- try
- {
- notifyIcon1.Icon = new System.Drawing.Icon(Path.GetFullPath(@"image\graph.ico"));
- notifyIcon1.Text = "Export Datatable Utlity";
- notifyIcon1.Visible = true;
- notifyIcon1.BalloonTipTitle = "Welcome Devesh omar to Datatable Export Utlity";
- notifyIcon1.BalloonTipText = "Click Here to see details";
- notifyIcon1.ShowBalloonTip(100);
- }
- catch (Exception ex)
- {
- }
- }
- Call the preceding method at form_load as in the following:
- private void Form1_Load(object sender, EventArgs e)
- {
- Displaynotify();
- }
- Complete Code:
- Running the application:

- Go to the bottom-right status bar as in the following:

- Handling events:
Right-click on the notifyincon to see the property window:
- Add code for the notifyicon click as in the following:
- private void notifyIcon1_Click(object sender, EventArgs e)
- {
- MessageBox.Show("DEVESH !!! you clicked on notifyicon");
- }
- Run the code and click on the following icon:


Conclusion
We have learned the basics of notifyicons in C# Windoes Forms.

saad khatriPosted Oct 5, 2021, 6:05 AM
Thank you! Helped me
sachin gaikwadPosted Dec 28, 2019, 1:43 AM
Am try but its work on my pc but not show other to that msg plz
sachin gaikwadPosted Dec 28, 2019, 1:42 AM
Devesh can i show same notification to all other pc how using same application and they are connected throw lan
Pandurang PailvanPosted Feb 23, 2017, 1:17 AM
Nice Article devesh very helpful..
Saber ShaikhPosted Jun 23, 2016, 3:58 AM
Thanks
Dharam RaiPosted Mar 11, 2016, 6:14 PM
@ Devesh Omar is there a way to make it happen periodically say from 1st to 10th of every month. Would be really helpful for if throw light on it, thanks a ton.
Harsh SinghPosted Nov 13, 2015, 3:56 AM
Sir can you tell how to periodically get the following notifications.I mean how to get this notification on a desired time.thanks in advance
Devesh OmarPosted Jul 17, 2014, 8:11 AM
Thanks Lakshmanan
Lakshmanan Sethu SankaranarayanPosted Jul 17, 2014, 3:08 AM
Nice one!!
Max AlbishPosted Jul 17, 2014, 1:28 AM
Nice
Devesh OmarPosted Jul 17, 2014, 1:00 AM
thanks
Krishna Rajput SinghPosted Jul 16, 2014, 11:34 PM
good article
Prerana TiwariPosted Jul 16, 2014, 10:57 PM
Nice information........
Gurunatha DogiPosted Jul 16, 2014, 4:33 PM
Nice Article