Results 1 to 4 of 4

Thread: Popup Menu

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613

    Popup Menu

    I create a popup menu. Whenever I right click the menu appear, but if I right click again, the already appeared menu is still at the same position. I want it to move to my new position.

    How can i do this?

    Here is my code
    Code:
    Private Sub tvMain_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
        If Button = 2 Then
            PopupMenu mnuPopup
        End If
    End Sub
    Thanks

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    PopUpMenu mnuPopup, 2

    There is a constant for 2, but I forget it right now

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Try this just for fun:
    VB Code:
    1. If Button = [b]vbRightButton[/b] Then ' use constants!
    2.     PopupMenu mnuPopup, , x, y
    3. End If

  4. #4
    Originally posted by crptcblade
    PopUpMenu mnuPopup, 2

    There is a constant for 2, but I forget it right now

    From the help :
    vbPopupMenuRightButton 2 An item on the pop-up menu reacts to a mouse click when you use either the right or the left mouse button.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width