473,394 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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.ContextMenuStrip.Show();

Absolutely nothing happens.

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

this.btnMenu.ContextMenuStrip.Show(this.btnMenu, 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.ContextMenuStrip.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
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...
0
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...
2
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...
0
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...
2
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...
2
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
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...
1
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?...
7
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.