I have a question here. I need to know how to make a custom context menu, like when i right click on an item in a list box for example, a context menu with stuff i want on it will appear.
Printable View
I have a question here. I need to know how to make a custom context menu, like when i right click on an item in a list box for example, a context menu with stuff i want on it will appear.
first add a new menu to your form with the menu editor and make sure the topmost entry is not visible
goto the mouseup event of the control you want to use the
menu on and enter code like
If button =2 then PopupMenu yourMenuName
if you are trying to add a context menu to a control that already
has a default one (like a textbox) then you have to do something
different.
here is a sample project with the popupmenu off of a picture box
http://sandsprite.com/CodeStuff/image_map.zip
Thank you very much! Worked great :D