473,569 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ContextMenu not showing on Button

Hi

I have a button on a Windows Form and it has a ContextMenu set, when the
user clicks the button I want the menu to appear, I've tried this:

btnMenu.Context MenuStrip.Show( );

Absolutely nothing happens.

Any ideas?
Thanks
Kev
Mar 22 '06 #1
1 3996
You mentioned ContextMenu and ContextMenuStri p. These are different
components. Ensure that you're setting either the ContextMenu or
ContextMenuStri p property with the appropriate component. Then call one of
the Show method overloads that allows you to specify the location. For
example...

this.btnMenu.Co ntextMenuStrip. Show(this.btnMe nu, 0, 0);

--
Tim Wilson
..NET Compact Framework MVP

"Mantorok" <sp******@spam. com> wrote in message
news:3a******** *************** ***@news.rmplc. co.uk...
Hi

I have a button on a Windows Form and it has a ContextMenu set, when the
user clicks the button I want the menu to appear, I've tried this:

btnMenu.Context MenuStrip.Show( );

Absolutely nothing happens.

Any ideas?
Thanks
Kev

Mar 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1155
by: Stephan Wright | last post by:
Hy! I do want to add an item to the contextmenu which appears when you rightclick onto a contact item. This item should be my application. And if possible the clicked item should be send to the application for some further operation. At the moment I have created a MenuBarButton which is connected to my application. But then I would have...
0
1653
by: MD | last post by:
I have a ContextMenu that is assigned to 3 RichTextBox's (i.e., if you right-click on any of the 3 RichTextBox's, you get the same ContextMenu). My ContextMenu has 2 items, each of which have their own click event handlers. When I click on any of the options in the ContextMenu, I want to know which RichTextBox the ContextMenu is currently...
2
9573
by: VR | last post by:
I have a form with a list view control, a button control and a main menu with menuDelete item. Any time I am handling a button click event or menuDelete click event I call DeleteItem() function which removes the selected item from the list. If I right-click on my list, I clone menuDelete item and display a pop-up menu. So, if user selects...
0
1122
by: Valerie Hough | last post by:
I have two different cases: 0) I right click the mouse button on a list box on my form, then in the Popup handler for the list box I use SendKeys to send three characters at once (the mnemonics for the three submenus I want to open). These characters cause three levels of submenu to open. This is just what I want to happen except I want to...
2
2911
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to the menu, it seems to disappear. This only breaks when the context menu is tied to a NotifyIcon - not to any other control. Below is a C# file...
2
2117
by: Zieben | last post by:
Hello! I have such problem! I have my UserControl. I override property ContextMenu for this Control as ..... new ContextMenu ContextMenu{ set {_contextMenu = value;}
9
1995
by: I_AM_DON_AND_YOU? | last post by:
I have written a VB.Net program. This program has a ConetxtMenu1. ContextMenu1 is very big and has many levels. There are so many procedures and depending upon the logic many times a menu item would be visible or hidden. I have noticed that in one procedure I am setting the value of a menuitem's visible property as TRUE but still it is...
1
1415
by: MuZZy | last post by:
Hi, The problem i have is to show a ContextMenu on a toolbar depending on which ToolBarButton is currently under cursor. Is there any way to find out which ToolBarButton mouse is pointing? ToolBar.GetChildAtPos() doesn't work as ToolBarButton is not a child control fo a toolbar... I am implementing a sort of Windows Task Bar for my MDI...
7
2216
by: wandii | last post by:
Hi, I am trying to show the shortcut menu on a richtextbox control by adding the contextmenu component onto the form. The richtextbox property is assigned to the contextmenu. I created my shorcuts, copy, paste, etc. However, on the form I have a datagrid which is also assigned to the same contextmenu and contextmenupopup event as follows:...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.