popup menu

usrsampath
usrsampath used Ask the Experts™
on
hello friends
Usually popupmenu contains menuitems that are already created in main menu.is that possible that popupmenu with
new menu items that are not in main menu
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hey usrsampath,

Here's a quick of creating a popup menu.

First, create the menu from menu editor.  Set the main branch of your menu for visible to false.

From your function or whatever you're using to call the popup menu. So let say you want to use the right mouse click, you'll do something like this:

Private Sub lvwDB_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

   If Button = vbRightButton Then 'if right button is press
          Me.PopupMenu "youmainbranchname"
           
   End If
End Sub

Hope it helps.

Commented:
Here is a basic example of adding to a menu:

mnuFile is defined with an index to add new items to it.

for i = 1 to 10
  Load mnuFile(i)
  mnuFile(i).Caption = Cstr(i)
next i

Hope this helps.
Author of the Year 2009

Commented:
Hi usrsampath,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept xile001's comment(s) as an answer.

usrsampath, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial