---
title: "Make custom right click on a winform in C#"  
description: "In this blog I am trying to explain the how to make a custom right click in C#."  
author: "Vijay Shukla"  
published: 2013-06-24  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/1359/make-custom-right-click-on-a-winform-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Make custom right click on a winform in C#

In this blog I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to [explain](https://www.mindstick.com/forum/159699/what-is-a-compilation-error-in-dot-net-core-explain-with-an-example) the how to make a [custom](https://www.mindstick.com/blog/134981/midwest-tropical-is-your-best-source-for-custom-water-features) right click in C#.\

When I right click on a winform in C# then don’t have any menu popup will show if we want to add a right click popup menu the use the ContextStripMenu.

##### Implement ContextStripMenu in my demo

1. Open the VS 2010 and create a new project.

2. Give the appropriate name of your demo project.

3. By [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) show a Form1.

4. [Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) the ContextStripMenu from toolbox.

5. Then Right click on Form1 and [select](https://www.mindstick.com/forum/34066/use-select-operator-in-linq) the ContextStripMenu property and select your ContextStripMenu which drag and drop on editor.

![Make custom right click on a winform in C#](https://www.mindstick.com/mindstickarticle/56c7fd3b-8aa1-4fa3-a74d-baec6683368d/images/ebd33243-c133-4dfc-b23a-ffc261e813ae.png)

6. Click on the contextMenuStrip1 to show on the form.

![Make custom right click on a winform in C#](https://www.mindstick.com/mindstickarticle/56c7fd3b-8aa1-4fa3-a74d-baec6683368d/images/b5400738-6077-45fa-a4d5-99b5e55f593f.png)

7. [Double click](https://www.mindstick.com/forum/156225/differentiate-between-google-adword-and-double-click) on the [refresh](https://www.mindstick.com/forum/12865/how-to-refresh-dropdownlist-but-keep-old-selected-value-json) and exit to get it events.

8. Write the this.Refresh() in refresh sub menu event below is example:

\

```
private void showToolStripMenuItem_Click(object sender, EventArgs e)
{
      this.Refresh();
}
```

<![if !supportLists]> 9. <![endif]> Write the this.Close() in Exit sub menu event below is example:

\

\

```
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
      this.Close();
}       
```

##### Output:

![Make custom right click on a winform in C#](https://www.mindstick.com/mindstickarticle/56c7fd3b-8aa1-4fa3-a74d-baec6683368d/images/af16ebb6-68c5-46ee-87d3-93cb6c468ad0.png)\

---

Original Source: https://www.mindstick.com/articles/1359/make-custom-right-click-on-a-winform-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
