PopUp Menus

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dfg

    #1

    PopUp Menus

    Hi...Just a quick question about popup menus. I have a menu popup using
    the code below:

    Private Sub fraAccBal_Mouse Down(Button As Integer, Shift As Integer, X
    As Single, Y As Single)
    If Button = 2 Then
    PopupMenu mnuHi
    End If
    End Sub

    After then menu pops up, I click on an item, but nothing happens. Where
    do I put the code to make things happen?

    Thanks.

  • Rick Rothstein

    #2
    Re: PopUp Menus

    > Hi...Just a quick question about popup menus. I have a menu popup using[color=blue]
    > the code below:
    >
    > Private Sub fraAccBal_Mouse Down(Button As Integer, Shift As Integer, X
    > As Single, Y As Single)
    > If Button = 2 Then
    > PopupMenu mnuHi
    > End If
    > End Sub
    >
    > After then menu pops up, I click on an item, but nothing happens. Where
    > do I put the code to make things happen?[/color]

    You put the code in each item's Click event. At Design Time, find an item
    that is on the popup menu at its location on the form's main menu bar and
    click on the item you want to code for... VB will take you to that item's
    Click event code section automatically.

    Rick - MVP


    Comment

    • C. Alexander

      #3
      Re: PopUp Menus

      Create a click event for each menu item
      in the form code on which the menu is on

      Private Sub mnuItem1_Click( )
      ' do code
      End Sub

      Private Sub mnuItem2_Click( )
      ' do code
      End Sub

      Alternatively, in your menu editor,
      make the top level of the menu visible.
      In the design window, you will see the
      menu showup at the top.

      Click on your menu/item to go to the code
      when ur done, uncheck Visible in the menu editor



      "dfg" <dfg@dfg.net> wrote in message
      news:y53ob.2207 69$9l5.115149@p d7tw2no...[color=blue]
      > Hi...Just a quick question about popup menus. I have a menu popup using
      > the code below:
      >
      > Private Sub fraAccBal_Mouse Down(Button As Integer, Shift As Integer, X
      > As Single, Y As Single)
      > If Button = 2 Then
      > PopupMenu mnuHi
      > End If
      > End Sub
      >
      > After then menu pops up, I click on an item, but nothing happens. Where
      > do I put the code to make things happen?
      >
      > Thanks.
      >[/color]


      Comment

      Working...