Questions tagged [contextmenustrip]

ContextMenuStrip should appear when a user right-clicks, reacting to the surroundings. It represents a shortcut menu in C#.

ContextMenuStrip replaces ContextMenu. You can associate a ContextMenuStrip with any control, and a right mouse click automatically displays the shortcut menu. You can show a ContextMenuStrip programmatically by using the Show method. ContextMenuStrip supports cancelable Opening and Closing events to handle dynamic population and multiple-click scenarios. ContextMenuStrip supports images, menu-item check state, text, access keys, shortcuts, and cascading menus.

For more details: http://msdn.microsoft.com/en-us/library/system.windows.forms.contextmenustrip(v=vs.110).aspx

293 questions
0
votes
1 answer

Error on datagrid while right clicking ContextMenuStrip

Hi I've added a contextMenuStrip on a dataGrid in WindowsForm, but first time after right click, form minimize. I re-open it and now right click show me contexMenuStrip. Can you give me a solution? Regards. EDIT: I've added another contexMenuStrip…
user1849976
  • 53
  • 1
  • 10
0
votes
0 answers

Different column's behavior in Infragistics.UltraGrid

I have an Infragistics.UltraGrid and I want to add a right-click event on it. I have 6 columns in grid and when I click on last four columns of six I call context menu, but when I right click on first and second column nothing is happen. By the way…
0
votes
2 answers

ContextMenuStrip Custom Layout

I'm trying to have a Windows Forms ContextMenuStrip control display a list of countries, about 200 total. Currently it displays them all vertically which creates for a long wait time to scroll to countries near the bottom of the list. I've tried…
bbqchickenrobot
  • 3,592
  • 3
  • 45
  • 67
0
votes
3 answers

Is there anyway to get TreeNode that opened ContextMenuStrip in ToolStripMenuItem click handler?

I have TreeView with different level TreeNodes I added same ContextMenuStrip to all parent TreeNodes and i want to get possibility to delete all child TreeNodes by opening that ContextMenuStrip and pressing "Delete all" private void…
Kosmo零
  • 4,001
  • 9
  • 45
  • 88
0
votes
4 answers

Show ContextMenuStrip at location of StatusBar item

I want to show a ContextMenuStrip at the location of a ToolStripStatusLabel in a StatusStrip. Ordinary controls have PointToScreen / PointToClient / etc, but as ToolStripStatusLabel is derived from Component it does not. Any help would be…
John Taylor
0
votes
1 answer

Show/Hide ContextMenuStrip outside the form

I'm creating a simple clipboard manager application. It monitors the content of a clipboard. When a change occurs (throu the win api message loop) it fires up a method to capture current content of clipboard and creates new object called…
Alexander
0
votes
2 answers

How to extend an existing ContextMenuStrip?

I've a common ContextMenuStrip for every workspace control of my application. This ContextMenuStrip contains 4 Items ("Move front", "Move back", and "Delete control"). Now I want to extend it for one control. There's a DataGridView on this control…
pinki
  • 902
  • 2
  • 12
  • 29
0
votes
1 answer

Event handler for a ContextMenuStrip of NotifyIcon in C#

I want to write a click event for a ContextMenuStrip. I have linked this context menu strip to a NotifyIcon. How can I do that? This is the code I have used: ContextMenuStrip checkers_contact_menu = new…
Niranjan Sonachalam
  • 1,545
  • 1
  • 20
  • 29
0
votes
1 answer

Replicating ContextMenu constructor in ContextMenuStrip

From my research and understanding, the ContextMenuStrip is supposed to be the successor to the ContextMenu and, in the spirit of keeping my code updated and sound, I set out to replace one such instance of a ContextMenu. Previously, to give a…
B L
  • 1,572
  • 1
  • 14
  • 26
0
votes
3 answers

Is passing an EventArg around event handlers potentially dangerous?

I'm calling an event handler from another one: private void launchApplicationToolStripMenuItem_Click(object sender, EventArgs e) { listApplications_DoubleClick(listApplications, null); } private void…
-1
votes
1 answer

Why is the option to add a ContextMenuStrip greyed out in the toolbox in Visual Studio 2022?

I've been googling for hours and can't seem to resolve this or add a ContextMenuStrip in via code (as I'm still learning) Ideally I would like the option to not be greyed in VS2022 as it would make things a lot more simple! Toolbox Image I have…
-1
votes
1 answer

Adding function to items in contextmenustrip Windows Forms

I am creating dynamically buttons in windows forms by using the code below. I want to have a context menu with different options pop up when a button is being right clicked. I made the context menu strp and it shows up but i cant figure out how to…
Ortero
  • 15
  • 5
-1
votes
1 answer

ContextMenuStrip Location Point

How to open the ContextMenuStrip programmatically at the cursor on right mouse button down/clicked over PictureBox? I need to open ContextMenuStrip only in some areas of an Image (Schedule) in a PictureBox, so I disconnected the…
Oak_3260548
  • 1,882
  • 3
  • 23
  • 41
-1
votes
1 answer

How to handle ContextMenuStrip property, exspecially border color

How to handle ContextMenuStrip property, especially border-color??? Any method in C# OR Any way by using Windows API (DllImport)?
ki-myong
  • 1
  • 2
-1
votes
2 answers

WPF sending mouse wheel event from ContextMenu to Window

I have a window, on it, i have a button. The button has a context menu:
1 2 3
19
20