Results 1 to 13 of 13

Thread: Popupmenu is not working.

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Popupmenu is not working.

    from user control you'd have to specify Parent.MenuName:
    VB Code:
    1. 'label is located directly on the user control
    2. Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    3.     If Button = vbRightButton Then
    4.         PopupMenu Parent.mnuFile
    5.     End If
    6. End Sub

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Popupmenu is not working.

    Quote Originally Posted by RhinoBull
    from user control you'd have to specify Parent.MenuName:
    VB Code:
    1. 'label is located directly on the user control
    2. Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    3.     If Button = vbRightButton Then
    4.         PopupMenu Parent.mnuFile
    5.     End If
    6. 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.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Popupmenu is not working.

    I have no problem using the following code inside a usercontrol
    VB Code:
    1. Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     If (Button And vbRightButton) = vbRightButton Then
    3.         UserControl.PopupMenu mnuPop
    4.     End If
    5. End Sub

  5. #5

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Popupmenu is not working.

    Quote Originally Posted by Joacim Andersson
    I have no problem using the following code inside a usercontrol
    VB Code:
    1. Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     If (Button And vbRightButton) = vbRightButton Then
    3.         UserControl.PopupMenu mnuPop
    4.     End If
    5. 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.

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    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.

  7. #7
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Popupmenu is not working.

    can u post your code..

  8. #8

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Popupmenu is not working.

    I'm trying to reproduce it in an easier project (without all the resize and event's code9... but I cannot reproduce 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.

  9. #9

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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.

  10. #10
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Popupmenu is not working.

    Quote 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.

  11. #11

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Popupmenu is not working.

    Quote 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.

  12. #12
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Popupmenu is not working.

    Quote 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?

  13. #13

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Popupmenu is not working.

    I can't!! Even the project I did to code and test the usercontrol seems to be working correctly.

    However, when I use this Usercontrol in a form which is loaded through a "bigger" Usercontrol, does not work!
    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.

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