About 215,000 results
Open links in new tab
  1. Adding a context menu on a button or a split button in c# WinForm ...

    You can have your own button class, derived from Button, with a couple of overrides that will do the job simply. Just pass in a ContextMenuStrip (splitMenuStrip in my code below).

  2. c# - Adding a right click menu to an item - Stack Overflow

    Start by simply dragging a ContextMenuStrip onto the form. It will just put it into the top left corner where you can add your menu items and rename it as you see fit. You will have to view code and enter in an event yourself on the form.

  3. c# - how to show contextmenustrip when a button is clicked in …

    Sep 7, 2019 · The ContextMenu.Show () method has a number of overloads - in your case, a good solution would be this one: It positions the context menu relative to your button. layoutMenus.Show(Button1, new Point(0, Button1.Height))

  4. C# Winform: How to show context menu when user will click on ...

    Oct 22, 2021 · On button click i show context menu just below the button this way. private void button1_Click (object sender, EventArgs e) { Point screenPoint = button1.PointToScreen (new Point (button1.Left, button1.Bottom)); …

  5. How to Create Context Menu in Windows Forms Application Using C#

    In this article we will see how to create a Context Menu, Popup Menu or Shortcut menu in a Windows Forms application with the ContextMenuStrip control using C#. A context menu is a group of commands or menu items that can be accessed by right-clicking on the control surface.

  6. How to: Associate a ContextMenuStrip with a Control

    May 6, 2025 · After creating your controls and shortcut menus, use the following procedures to display a given shortcut menu when the user right-clicks the control. These procedures associate a ContextMenuStrip with a Windows Form and with a ToolStrip control.

  7. ContextMenu Component Overview - Windows Forms | Microsoft …

    May 6, 2025 · With the Windows Forms ContextMenu component, you can provide users with an easily accessible shortcut menu of frequently used commands that are associated with the selected object.

  8. c# - Windows.Forms button with drop-down menu - Stack Overflow

    Apr 12, 2017 · I'm developing simple C# application using Windows.Forms on .NET. I need some button that will show a drop-down menu with subcategories - much like ToolStripMenu, but the button, you know.

  9. How to Add Right Click Menu to an Item in C# - Delft Stack

    Feb 2, 2024 · You will learn how to add a right-click menu to an item in a C# windows form by following the instructions in this article.

  10. ContextMenu Class (System.Windows.Forms) | Microsoft Learn

    Typically, a shortcut menu is displayed when a user clicks the right mouse button over a control or the form itself. Visible controls and Form have a ContextMenu property that binds the ContextMenu class to the control that displays the shortcut menu.

  11. Some results have been removed
Refresh