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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Popupmenu

Status
Not open for further replies.

MZwijacz

Programmer
Jun 27, 2002
33
US
I have an app(appmenu) that is called from another app(appcaller). Appcaller does not allow cascading context menus. So the sole purpose of my app(appmenu) is to provide additional menus.

I can pop my menus just fine and execute the code. However I cannot cancel the menus. The problem seems to be there is no form that shows, to catch the esc key.

How can I cancel a popupmenu without a form showing ? The menus continue to show, even on top of other apps until I click an item.

Thanks,
MFZ
 
Can you reference the form with the menu? If so then you could set the focus to the form to remove it from the menu I.e.:

frmAppMenu.SetFocus
 
TomGuy,

I'll give it a try. But the form is just a container for the menu. It is never to be seen. The only reason to have the form is to hold the menu. If I could create the menu without the form I would have, unfortunatly not allowed in VB 6.

Any Ideas without making the form visable ? ;using code ?

Thanks,
MFZ
 

Last item in menu being Cancel Menu. Like the crystal reports have.

Just a thought

Good Luck

 
Yep that's what I ended up doing. I would have liked it to be more elegant. Similar to the standard, esc to cancel the menu.

Thanks,
MFZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top