SHARE
Facebook X Pinterest WhatsApp

C# Programming: Context Menu on Windows Forms – Part 1

What’s a Context Menu ? A context menu (also called contextual, shortcut, and popup or pop-up menu) is a list of menu items that appear or visually represented in the form of a GUI (Graphical User Interface) that execute a behavior or action when invoked. A context menu (also called contextual, shortcut, and popup or […]

Written By
thumbnail
CodeGuru Staff
CodeGuru Staff
Jul 21, 2010
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

What’s a Context Menu ?


A context menu (also called contextual, shortcut, and popup or pop-up menu) is a list of menu items that appear or visually represented in the form of a GUI (Graphical User Interface) that execute a behavior or action when invoked.


A context menu (also called contextual, shortcut, and popup or pop-up menu) is a list of menu items that appear or visually represented in the form of a GUI (Graphical User Interface) that execute a behavior or action when invoked.


One of the most common ways to invoke a context menu is by using a mouse, operations such as a right mouse click or middle click mouse operation.


An important observation to make here is the Context menu items change depending on the context on which they are invoked. In the simplest terms the context menu items change depending on the context they are invoked.





Figure shows the context menu being invoked when right clicked on the empty area of a desktop





Figure shows the context menu being invoked when right clicked on a directory/folder

Recommended for you...

Different Types of JIT Compilers in .NET
Tariq Siddiqui
Mar 17, 2023
Middleware in ASP.NET Core
Tariq Siddiqui
Mar 16, 2023
Intro to Intel oneDAL and ML.NET
Hannes DuPreez
Jan 16, 2023
Types of Query Execution in LINQ
Tariq Siddiqui
Dec 15, 2022
CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.