|
-
Apr 4th, 2005, 02:26 PM
#1
Thread Starter
Need-a-life Member
Popupmenu is not working.
Plain and simple. Popupmenu does not work. I'm writing an usercontrol and none of the Popupmenu works. Does anyone have any clue about it?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 4th, 2005, 02:39 PM
#2
Re: Popupmenu is not working.
from user control you'd have to specify Parent.MenuName:
VB Code:
'label is located directly on the user control
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
PopupMenu Parent.mnuFile
End If
End Sub
-
Apr 4th, 2005, 02:58 PM
#3
Thread Starter
Need-a-life Member
Re: Popupmenu is not working.
 Originally Posted by RhinoBull
from user control you'd have to specify Parent.MenuName:
VB Code:
'label is located directly on the user control
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
PopupMenu Parent.mnuFile
End If
End Sub
But the menu belongs to the usercontrol itself.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 4th, 2005, 03:03 PM
#4
Re: Popupmenu is not working.
I have no problem using the following code inside a usercontrol
VB Code:
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button And vbRightButton) = vbRightButton Then
UserControl.PopupMenu mnuPop
End If
End Sub
-
Apr 4th, 2005, 03:15 PM
#5
Thread Starter
Need-a-life Member
Re: Popupmenu is not working.
 Originally Posted by Joacim Andersson
I have no problem using the following code inside a usercontrol
VB Code:
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Button And vbRightButton) = vbRightButton Then
UserControl.PopupMenu mnuPop
End If
End Sub
Me neither... but on some conditions, the popupmenu won't work. What's more, I have an usercontrol (EFMMask) with a popupmenu that works ok. When I include this usercontrol (EFMMask) into another... no popupmenu works. Not even the EFMMask's menu.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 4th, 2005, 03:31 PM
#6
Re: Popupmenu is not working.
I can't reproduce your problem. I've created one usercontrol with a menu, and put that in another usercontrol that also has a menu. When I slap the other control on a form and run the project I get both popup menus depending on where I click.
-
Apr 4th, 2005, 04:57 PM
#7
Fanatic Member
Re: Popupmenu is not working.
-
Apr 4th, 2005, 09:33 PM
#8
Thread Starter
Need-a-life Member
-
Apr 4th, 2005, 09:39 PM
#9
Thread Starter
Need-a-life Member
Re: Popupmenu is not working.
My guess is that the system does not have enough memory to popup the menu... because it's working on a simpler project.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 4th, 2005, 09:42 PM
#10
Re: Popupmenu is not working.
 Originally Posted by Mc Brain
My guess is that the system does not have enough memory to popup the menu... because it's working on a simpler project.
I doubt that, because if that would be the case you wouldn't be able to display popup menus in any application. There must be something else in your code that suppress the menus.
-
Apr 4th, 2005, 09:57 PM
#11
Thread Starter
Need-a-life Member
Re: Popupmenu is not working.
 Originally Posted by Joacim Andersson
I doubt that, because if that would be the case you wouldn't be able to display popup menus in any application. There must be something else in your code that suppress the menus.
I'm running out of ideas. Do you have anything?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 4th, 2005, 10:06 PM
#12
Re: Popupmenu is not working.
 Originally Posted by Mc Brain
I'm running out of ideas. Do you have anything?
Not without seeing your code. Can you upload your project?
-
Apr 4th, 2005, 10:36 PM
#13
Thread Starter
Need-a-life Member
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
|