473,396 Members | 1,990 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,396 software developers and data experts.

adding right-click popup menu to windows form

VM
How can I display my own popup menu when a user right-clicks inside the
form? I know you use context menus but I don't how to implement them.

Thanks.
Nov 16 '05 #1
3 35244
Hi VM,

"VM" <vo******@yahoo.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
How can I display my own popup menu when a user right-clicks inside the
form? I know you use context menus but I don't how to implement them.

Thanks.


Drop a ContextMenu component onto the form designer from the toolbox.
Create an event handler for the MouseDown event of the form. Put code in the
MouseDown event handler that looks like this (this code assumes the
ContextMenu component is named mnuContext):

if (e.Button == MouseButtons.Right)
mnuContext.Show(this, new Point(e.X, e.Y));
Regards,
Daniel
Nov 16 '05 #2
drag a context menu control onto the form and fill in what you want. Then
go to the control in question and there will now be a ContextMenu property,
click on it and add your menu.
"VM" <vo******@yahoo.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
How can I display my own popup menu when a user right-clicks inside the
form? I know you use context menus but I don't how to implement them.

Thanks.

Nov 16 '05 #3
VM
Thanks for the reply. It looks great.
"VM" <vo******@yahoo.com> wrote in message
news:uD**************@TK2MSFTNGP12.phx.gbl...
How can I display my own popup menu when a user right-clicks inside the
form? I know you use context menus but I don't how to implement them.

Thanks.

Nov 16 '05 #4

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

Similar topics

2
by: lawrence | last post by:
Right now, over at www.monkeyclaus.org, the following script is getting to the 9th run through and dying after the line: echo "..."; You'll admit that is a strange place to die. I've hit...
2
by: Dr. Richard E. Hawkins | last post by:
I've googled around, and asked everyone I know, but I still can't find any reference to anyone else having faced this particular IE bug with floats. I've put a page at...
10
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
9
by: Ross Olney | last post by:
Im starting a program that is supposed to take in polynomials from the user. From there they can add them, subract, multiply, or divide them. My question is more of the design. What would be a...
17
by: Sri | last post by:
How do you add an n-bit number in C? Regards, Sri
6
by: Papa.Coen | last post by:
I've just spend a lot of time solving the following problem: I used dotNet 2.0 / Visualstudio 2005 / C# / aspx, enable viewstate is set on all controls. I have 2 listboxes; the left contains items...
19
by: ashkaan57 | last post by:
Hi, I have a page in a right-to-left language and I am trying to make some bulleted lists using <ul>, but it puts the bullets to the left. Is there any way I can set the bullets to be on the...
1
by: Anthony Levensalor | last post by:
Hey guys! I'm writing a widget wherein I want the pages using it to be able to subscribe to events on it. I did my own research, not asking anyone to write it for me, just want to make sure I'm...
2
by: rfdjr1 | last post by:
I'm using MS Access 2000. I have a small database to keep track of my lighthouse collection. Right now it's only two columns. I'd like to add a third. I'd like the new column to be the third...
1
by: superDk | last post by:
Hello, IE6 is adding a large margin between my two containers (container1 & container2) everything works fine in IE7 and Firefox. I've been searching on-line for a fix but I've had no luck. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
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...
0
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,...

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.