|
-
Nov 7th, 2000, 07:02 PM
#1
when I right-click on my form, a popup menu appears, but if I right-click again, the menu stays where it is, how do I get it to move to where I click?
P.S. - I tried:
Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button = 2) Then
PopupMenu mnuEdit, , X, Y
End If
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 7th, 2000, 07:38 PM
#2
_______
<?>
Code:
'make a popup menu just like the one's in windows
'appear at the right click of your mouse as long
'as your right click is on the form
Option Explicit
Private Sub Form_Load()
mnuPop.Visible = False
End Sub
'
'allow users the ability of win keyboard menu key
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 93 Then
'fire up the popup menu
PopupMenu mnuPop, 2, 60, 60
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
'fire up the popup menu
PopupMenu mnuPop, 2, X, Y
End If
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 7th, 2000, 08:33 PM
#3
Just to let you know, the constant for 2 here:
PopupMenu mnufile, 2, X, Y
is:
PopupMenu mnufile, vbPopupMenuRightButton, X, Y
some useless information, but may help in the future and help you to understand a bit more that you can use constants and not numbers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|