|
-
Jan 17th, 2000, 04:08 AM
#1
Thread Starter
Registered User
Hello...
How do I set a Popup-Menu that will be shown every time I
right-click on a PictureBox ?
Thanks in advance,
Lior.
P.S: Please answer me fast,
the answer is really important for me.
-
Jan 17th, 2000, 04:52 AM
#2
Lively Member
Right. Create a menu using the menu editor, but set the visible property to false.
Now, on your picture box, put if button = 2 then Popup(Name of menu) under the mouse down event
-
Jan 17th, 2000, 05:00 AM
#3
Here is the code
Code:
Option Explicit
Private ControlClicked As Control
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
Set ControlClicked = Picture1
PopupMenu mnuBtnContextMenu
End If
Set ControlClicked = Nothing
End Sub
On your form create a primary level menuitem with a caption of anything you want, a name of mnuBtnContextMenu and Visible [pi]not[/i] checked. Alo create a submenu item below that with a caption of What's This?, a name of mnuBtnWhatsThis, and Visible checked. That's it 
------------------
Marty
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
|