|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Context MenuI have added a ContextMenuStrip to my form and assigned
several controls to it. My question is how can I retrieve the menu item that has been clicked with in the ContextMenuStrip1_Click event and also how do I find the calling control that clicked the menu item? Thanks Each menu item in the context menu will have it's own click event. If
you are designing your context menu at design time, simply double click on the item and it will give you the code. If you are dynamically adding the menuitems at run time, use this... cmuContext.MenuItems.Add(New MenuItem(MenuText, AddressOf ClickHandler)) where the click handler is a method that you have written. The click handler can take parameters if needed. You may want to try using the form's ActiveControl property to see which control is currently active.
by default, public or private?
Getting current user name How is it possible ... Getting Color Depth / Quality of display adpater / screen need help on DateDiff function! Treeview, Transparent splash screen Transparent Label Property of List of Classes Is it possible to have different columns of a datagrid bound to different datatables? |
|||||||||||||||||||||||