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

Capture ContextMenu click event in C# .Net 3.0

I have created 1 contextmenu for a listbox in C#.net 3.0 . For that context menu I have written one event handler for mouseup event . But when i click on contextmenu item that event is not captured. I have done following:
{ /*in constructor of main window */
listbox1.ContextMenu.Items.Add("save");
listbox1.ContextMenu.MouseUp += new System.Window.Input.MouseButtonEventHandler(Contex tMenu_MouseUp);
....
}
ContextMenu_MouseUp(object sender, System.Window.Input.MouseButtonEventArgs e )
{
MessageBox.Show("Contextmenu item selected");
}

Please help...
Oct 3 '07 #1
0 2915

Sign in to post your reply or Sign up for a free account.

Similar topics

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...
1
by: Brian Martel | last post by:
I am trying to create a dynamic flyout submenu off of a contextmenu. I can right click and get the base contextmenu ok. On the Popup event I add MenuItem's to the collection of one of the items so...
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;}
5
by: ewillyb | last post by:
Hi, ASP.NET has some interesting behavior when the user hits the Enter key. If there are multiple ASP:Buttons (rendered as HTML submits) on the form, when the user hits enter, the first button's...
7
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To...
0
by: Jaime Lucci | last post by:
Hi everyone! I'm using an ActiveListBar control which is a COM Component. I´ve associated a context menu to it by the show method of my context menu: contextmenu.Show(activelistvar,position),...
3
by: Libby Sharf | last post by:
Hello, I have several ContextMenus and I want to connect them to the GridControl's ContextMenu property depending on the row that was right clicked. Is there an event that is raised just before...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.