Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right Mouse Menu's

Status
Not open for further replies.

sixsmithc

Technical User
Feb 2, 2001
21
0
0
GB
Can anyone tell me how to create custom right mouse button menus for use on my forms? Is there a simple way of doing this or does it involve API calls and such ?

Thank you

Carl
 
I haven't messed with it, but there some stuff in the help documentation (for once, usually that doesn't help me at all). Do a search on "Displaying Pop-up Menus" and see if it helps. =)
~Melissa
 
sixsmithc,
This is quite simple.
All you have to do is, create a menu and give it any name like mnumain using the menu editor.
Create the items that you want to display on the popup as submenus in mnumain.
Write the code for all the menu items by going to the form and double clicking on the menu-item.
After having completed this,go back to the menu editor and uncheck the visible property of the top item(mnumain) in the menu.This will make it invisible at run time.
Now to invoke this,you trap a right click event in the mouseup event of the form.In the code you will write the following:

if button=2 then
popupmenu mnumain
endif

in case of difficulties mail me.
smash81,
smash81@eudoramail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top