---
title: "How to create Notify Icon in C Sharp"  
description: "When we want to show icon of our application in System tray then we use notify Icon control from tool bar in our application."  
author: "Anonymous User"  
published: 2010-07-22  
updated: 2020-03-17  
canonical: https://www.mindstick.com/articles/69/how-to-create-notify-icon-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to create Notify Icon in C Sharp

When we want to show the icon of our application in System tray then we use notify Icon control from toolbar in our application.

After adding notify Icon to our form we have to write code.

```
private void frmRecord_Resize(object sender, EventArgs e)        {            //if form is minimized then it will not be displayed in taskbar.            if (FormWindowState.Minimized== this.WindowState)                Hide();        }private void notifyIcon1_DoubleClick(object sender, EventArgs e)        {            //this will maximize the application minimized to System tray.            Show();            WindowState = FormWindowState.Normal;        }
```

We can also create a context menu of the notify icon. To create the menu we have to add

ContextMenuStrip control from toolbar.

![How to create Notify Icon in C Sharp](https://www.mindstick.com/mindstickarticle/63903334-e5a3-4c53-92b7-14dd057c8d80/images/26157654-7a5d-41c6-8662-4e39d831fed1.png)\

We can add the menu element by selecting ContextMenuStrip. Here I’ve added two options on the menu. To link the menu to notify icon we have to set contextMenuStrip property of notifying icon to added contextMenuStrip.

![How to create Notify Icon in C Sharp](https://www.mindstick.com/mindstickarticle/63903334-e5a3-4c53-92b7-14dd057c8d80/images/b0ef3092-67e1-4a4d-9ead-04e721a3f737.png)

Code for contextmenustrip options.

```
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)        {            Show();            WindowState = FormWindowState.Normal;        }         private void exitToolStripMenuItem_Click(object sender, EventArgs e)        {            Application.Exit();        }
```

Screen Shot

![How to create Notify Icon in C Sharp](https://www.mindstick.com/mindstickarticle/63903334-e5a3-4c53-92b7-14dd057c8d80/images/4c988b0a-b486-4f71-9b4a-daefc75a25ea.png)\

---

Original Source: https://www.mindstick.com/articles/69/how-to-create-notify-icon-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
