|
-
May 24th, 2002, 03:17 PM
#1
Thread Starter
New Member
Popup Menu on Usercontrol Pls help !!!
Hi everyone
How do I create a popup menu on usercontrol.
In Usercontrol VB allows me to use Menu Editor to add a menu to Usercontrol. But when I call the menu as something like usually in the Form,
Me.PopupMenu mnuMyFile
I can't use Me. here can I ?
Example would be great 
Cheers
-
May 24th, 2002, 03:19 PM
#2
-= B u g S l a y e r =-
PopupMenu mnuMyFile
or
UserControl.PopupMenu mnuMyFile
?
-
May 24th, 2002, 03:22 PM
#3
-= B u g S l a y e r =-
in a usercontrol sample 
VB Code:
Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then PopupMenu popMenutest
End Sub
-
May 24th, 2002, 03:45 PM
#4
Thread Starter
New Member
Thanks alot
It works man, but why I can't use Me.something ... instead of just write popupmenu. Anyway, that's not important.
Cheers
-
May 24th, 2002, 04:08 PM
#5
PowerPoster
Originally posted by urbanpir8
Thanks alot
It works man, but why I can't use Me.something ... instead of just write popupmenu. Anyway, that's not important.
Cheers
You can't use Me because that is a keyword that refers to the current form. Since the user control is placed on the form, it cannot use the Me keyword for itself, or things would get all screwy. Just replace Me with UserControl or just go without. Either way works.
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
|