Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

C# Windows - DataGridViewComboBoxCell not being cleared from a DataGridView

I'm using VS 2022 C# Windows. I have a DataGridView that will display a DataGridViewComboBoxCell, depending on the col selected. private void dgv_CurrentCellChanged(object sender, EventArgs e) ...
Yuppski's user avatar
  • 157
1 vote
0 answers
42 views

C# ContextMenuScript cause GCHandle leak and Memory Leak in .Net Framework

I developed an application in .net framework 4.8, it can show, switch and close different .net displays via commands with many controls inside of the display again and again, I cannot hold them in ...
Atlas Liu's user avatar
1 vote
1 answer
154 views

How to make variable height for ToolStripMenuItems in ContextMenuStrip?

I need to have multiline items, but then every other item height become same as multiline. I don't understand how to control it's height. On the picture below, 3 other items have same height as the ...
Kosmo零's user avatar
  • 4,091
0 votes
1 answer
98 views

ToolStripMenuItem.Checked property does not set C# WinForms

I made a music player in C# and the only problem is the playlists context menu strip when you right click on the track. When the music is in a playlist, it checks; when it is not in a playlist, it is ...
Error404's user avatar
0 votes
1 answer
145 views

How to remove checked margin in tray icon context menu

I've created this little script running in tray. I've noticed that contex menu text is not placed completely to the left. After a little investigation I found out that it is because there is a space ...
Nawad-sama's user avatar
-1 votes
1 answer
184 views

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 ...
TimEdwards's user avatar
0 votes
0 answers
67 views

Measure ToolStripItem in custom ToolStrip renderer

I have a WinForms app for .NET Framework in which the text of items in context menus based on the the ContextMenuStrip component are drawn using Graphics.DrawString() to provide consistent look with ...
Tecman's user avatar
  • 2,959
0 votes
1 answer
189 views

Winforms' ContextmenuStrip and ChromiumWebBrowser

I need to show Winforms ContextMenuStrip but ChromiumWebBrowser gets in the way. By getting in the way I mean the ContextMenuStrip loses some of its significant behavior like the ability to process ...
Abet's user avatar
  • 123
1 vote
2 answers
216 views

C# how to get referece to ContextMenuStrip from underlying sub menuitems of at least two levels

How to get the referece to ContextMenuStrip from its underlying sub menuitem which is a ToolStripMenuItem of a ToolStripDropDownMenu which is a Dropdown of a ToolstripMenuItem of this ContextMenuStrip?...
Xiaoyuvax's user avatar
1 vote
2 answers
841 views

How to position a Popup Menu to the left side of a Button?

I have a Popup menu. The Popup menu has a two-column layout. Therefore, the Buttons are aligned in two columns, which are the left column and the right column. Inside it, there are Buttons. Upon ...
ewu11's user avatar
  • 65
0 votes
0 answers
147 views

ContextMenuStrip not copying to clipboard

This may be more of a RANT than question. That said the ContextMenuStrip is the worst control I have ever used.. Here is the process I added a ContextMenuStrip (CMS) to a RichTextBox then used a mouse ...
Vector's user avatar
  • 3,215
0 votes
1 answer
425 views

Why ContextMenuStrip is not opening at first time click from a button in C#?

I am currently developing a Matrix(layout) Popup Menu using a Form. Inside the popup menu, there's a Button. The button should open a ContextMenuStrip when left clicked, but not right clicked. With ...
ewu11's user avatar
  • 65
0 votes
0 answers
86 views

Stuck ContextMenuStrip In Bottom Of Form

i use a scrollable form in visual studio 2022,also i use contextmenustrip.problem is when the form is long,contextmenustrip doesn't in right place in design time so i can't use it,it's mean i can't ...
Saber's user avatar
  • 27
0 votes
1 answer
18 views

ContextMenuStrip disappears after a quarter second display

Well, I'm back. I solved the ListBox problem by using a ContextMenuStrip — or so I thought! It comes in perfect, then in a quarter second, two things happen: it disappears, and the TreeNode ...
ProudPrimate's user avatar
1 vote
2 answers
136 views

Getting all ContextMenuStrips

I have a UserControl which has several ContextMenuStrips add via VS Designer. They are not assigned at design time to any controls, because they are dynamically assigned to one "dropdown" ...
stigzler's user avatar
  • 977
1 vote
1 answer
309 views

ContextMenuStrip doesn't DPI scale when Form is dragged between monitors with different resolution/scaling (WinForms, .NET 6.0, PerMonitorV2)

The ContextMenuStrip doesn't scale when its parent Form is dragged between monitors of different resolution/scaling. The ContextMenuStrip is correctly shown with correct scaling for whatever screen it ...
JohnC's user avatar
  • 91
0 votes
0 answers
80 views

Why isn't the subitem displayed on the contextMenuStrip when called on the right-click event on the DatagridView?

When I call the context menu the DataGrdiView does not show the menu sub items. But if I call this menu by right clicking on the form, then everything works correctly. The photo shows the same menu. ...
GAAAN's user avatar
  • 399
0 votes
2 answers
183 views

Hide dummy taskbar icon for notification icon context menu

I have a simple .Net 5.0 WinForm form which is automatically hidden after the application started: private void form_Shown (object sender, EventArgs e) { Hide (); } It only creates a notify icon. ...
André's user avatar
  • 434
1 vote
2 answers
1k views

Which method need to override to round the corner of NotiIcon's ContextMenuStrip?

In windows 11, I have found that almost every Systray Icon's Context Menu has a round corner. As there is no Systray Menu for WPF application, I have used Window's form NotiIcon and ContextMenuStrip. ...
yeasir007's user avatar
  • 2,120
2 votes
1 answer
335 views

How to add custom animations to a ContextMenuStrip?

Is there a way to create an animation when a ContextMenuStrip is opened, like in the this image? this animation is for WhatsApp right click.I have no idea how to do this.
vahid Araghi's user avatar
0 votes
1 answer
75 views

Add MenuItems to a ContextMenuStrip from SubItems of a ListView

My Form defines a ContextMenuStrip: Dim CMS As New ContextMenuStrip Button1.ContextMenuStrip = CMS There is also a Listview with 5 columns and some data: ListView1.View = View.Details How can I ...
Lider13's user avatar
  • 47
2 votes
2 answers
529 views

Area for check mark in WinForms ContextMenuStrip is narrow on high dpi

We have a WinForms app for .NET Framework 4.7.2. The main form contains a toolbar based on the ToolStrip component. One of the buttons displays a drop-down menu based on the ContextMenuStrip component....
Tecman's user avatar
  • 2,959
-1 votes
1 answer
98 views

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 ...
Ortero's user avatar
  • 15
0 votes
3 answers
2k views

Visual Studio 2019 menustrip item click event

I've been working for a while on a school project which involves menustrip items in a C# windows forms application. I'm currently working in Visual Studio 2019. I've tried over and over again to find ...
H. Dani's user avatar
  • 11
0 votes
3 answers
608 views

ContextMenuStrip Requires Two Right Clicks to Display

I like to create my contextmenu's programmatically. I generally do not add the items to the contextmenustrip until it is opening as the items that get displayed are dependent on other aspects of the ...
Dan's user avatar
  • 149
0 votes
0 answers
177 views

VB.NET - Invoke ContextMenu Item Click Programatically for WebBrowser control

I am having a WebBrowser control and loaded a local image into an IMG tag and set the DocumentText of the WebBrowser as below <!DOCTYPE HTML> <meta http-equiv='X-UA-Compatible' content='IE=...
bkar81's user avatar
  • 25
3 votes
0 answers
128 views

Delete Notifyicon ContextMenuStrip item from another exe file in c#

I have 2 project in my solution on Visual Studio. First project (Winforms/Application) has got a notify icon with content menu strip like this: private void TrayMenuContext() { notifyIcon1....
Habip Oğuz's user avatar
  • 1,193
0 votes
1 answer
56 views

ToolTipText popping up underneath control

I've got a .NET app with a NotifyIcon that sits in the systray. That nic has a ContextMenuStrip and that ctx mnu has several ToolStripMenuItems in it. Most of them have their ToolTipText set at run-...
WATYF's user avatar
  • 429
1 vote
1 answer
546 views

How to add Controls, as a toolbar, to a ContextMenuStrip?

I'm making a Web Browser, but I don't know how to add these buttons on top of its ContextMenuStrip: A Sepator make columns for all items, but no for only one line. Do you have any idea how to make ...
Kuba_Z2's user avatar
  • 54
-1 votes
1 answer
89 views

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 ...
Oak_3260548's user avatar
  • 1,962
1 vote
1 answer
362 views

How to extract all ToolStripMenuItems of a ContextMenuStrip using recursion?

I am tryng to extract all items from a ContextMenuStrip to a List(Of ToolStripMenuItem). I can get the reference of the ContextMenuStrip of a DataGridView, then - with a recursive function - I want to ...
Matteo Scattolin's user avatar
2 votes
1 answer
849 views

Change space between Image and Text in ContextMenuStrip

In my application, I have a ContextMenuStrip with two items. Each item has an image and a text. There's a default gap between the Image section of the Menu Items and their text, as shown in the image ...
Somanna's user avatar
  • 296
0 votes
3 answers
782 views

Checking if ContextMenuStrip contains an item

I have a ContextMenuStrip, at runtime I add new items to that ContextMenuStrip and I want to know how I can check if the ContextMenuStrip contains the item, if the same item is already in the ...
user avatar
0 votes
1 answer
491 views

C# UITypeEditor Dropdown Not Working With Click Event

WHAT I'M TRYING TO DO Hello everyone. I'm trying to make a dropdown inside a property grid. This dropdown for some objects will just place its text inside the property, like a StringConverter. But for ...
user avatar
1 vote
0 answers
95 views

C# - ToolStripMenuItem-List changes count while adding its elements to another contextmenu

I'm currently stuck with this problem: my project communicates via the TR.064 interface with the Fritz!Box (router) to get information about the user in my LAN. This action is permanently done in the ...
Felixus's user avatar
  • 11
0 votes
0 answers
102 views

ContextMenuStrip does not appear when clicking on object within a UserControl

I created a UserControl with a chart inside that are the same size. In my main form I create these UserControls dynamically and I can delete or edit them using a ContextMenuStrip by right clicking. ...
Neuronio's user avatar
2 votes
1 answer
434 views

ToolStripLayoutStyle.Table not working in ContextMenuStrip

I want to shown a context menu where the menu items are images that are laid out in a grid. However, when I set LayoutStyle to ToolStripLayoutStyle.Table in the ToolStripDropDown of a menu, it will ...
Nick Betts's user avatar
1 vote
1 answer
817 views

Change transparency for ToolStrip submenu

I am tampering with ToolStrip modifications as of now and is trying to make the submenu also transparent like the MenuStrip. I can't manage to make the submenu's property to be like the menu itself. ...
TerribleDog's user avatar
  • 1,247
1 vote
1 answer
1k views

How to change the background color of ToolStripItems?

When I add a ToolStripMenuItem to a ContextMenuStrip and then add a ToolStripComboBox in it, the background color under the ToolStripComboBox isn't blue. However, as you can see it's blue under 'Sub ...
David Fields's user avatar
1 vote
1 answer
113 views

ContextMenuStrip item to perform different actions depending on who calls it

I have created a ContextMenuStrip with three different items. Then I have a TreeView with a parent and child nodes. I assigned the ContextMenuStrip to both nodes like so: fatherNode.ContextMenuStrip =...
winter's user avatar
  • 227
-1 votes
1 answer
695 views

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's user avatar
0 votes
0 answers
42 views

RowIndex Returns Error in ContextMenuStrip

I've been looking for a way. To Edit, update and delete my data using a contextmenustrip. Basically what I want is for my contextmenustrip to be able to interact with Datagridview, the problem is ...
Akagami Shanks's user avatar
1 vote
2 answers
190 views

How do I programatically show the DropDown of ContextMenuStrip?

I need a button to show the ContextMenuStrip associated with it on mouse left click instead of right click. How can I achieve this?
DorkyDork's user avatar
1 vote
0 answers
59 views

ConextMenuStrip Returns Null On Shortcut Key Only

I have an odd one. I have a Windows form with a DataGridView with a ContextMenuStrip (right click menu). On that menu, I added a ToolStripMenuItem with a shortcut key. When the shortcut key is ...
Dan's user avatar
  • 149
0 votes
1 answer
597 views

Get text on items and sub-items contextmenustrip

I have a contextmenustrip in the toolStripDropDownButton with the following items and sub-items: private void addItem() { toolStripDropDownButton1.DropDown = this.contextMenuStrip1; ...
Kolimondi's user avatar
0 votes
0 answers
276 views

Right mouse click functionality is not working in DataGridView

In DataGridView (C# WinForm app) I have programmed, if a row is selected and you right click on a RowHeader, the ContextMenuStrip is shown. It was meant the ContextMenuStrip can show only if you click ...
Plemic's user avatar
  • 1
0 votes
1 answer
177 views

C# WinForm: contextMenuStrip throws InvalidOperationException after .Show() method when called from BackgroundWorker_ProgressChanged event [duplicate]

I have a WindowsForm in C# with a TrayIcon including a contextMenuStrip with a ToolStripTextBox, a FileSystemWatcher and a BackgroundWorker. The FileSystemWatcher throws an event when a new file is ...
dee7kay's user avatar
  • 23
0 votes
2 answers
134 views

Identify List View from contextMenuStrip click

I have 8 listViews controls in my C# program. I have just one contextMenuStrip that they all reference. How can I know which listView control triggered the contextMenuStrip selection?
TKO's user avatar
  • 29
-1 votes
2 answers
880 views

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: <Window> <ScrollViewer Height="500"> <Button Height = "2000"> <Button.ContextMenu> <...
khoa_chung_89's user avatar
1 vote
0 answers
53 views

How can I find which item I right clicked on without creating a ContextMenuStrip per item

I am attempting to build a TCP based controller for the servers and VMs in my house, I want each server to have a dedicated port so I can easily know which is which as there are quite a few HyperV ...
Tyson's user avatar
  • 45

1
2 3 4 5 6