Results 1 to 7 of 7

Thread: Problem PopUpMenu

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    97

    Problem PopUpMenu

    ¡Hello!

    Attach compressed file of the project: PopUpMenu.zip

    Explanation of the problem:

    When I click the button on the first form show the menu and opens the second form, but when I click with the right mouse button on top of the form does not show the following menu

    Is there any solution?

    Greetings

  2. #2
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: Problem PopUpMenu

    The problem you have there is the fact that you are opening the second form as modal. VB can only handle one popupmenu at a time so by opening the second form you are suspending the execution of the first popupmenu until you have finished with second form, you can either open the second form without modal or there is a work around by using a timer to give the first popupmenu time to close.
    Code:
    'your menu
     Private Sub b_Click()
       Timer1.Interval = 50
       Timer1.Enabled = True
    End Sub
    
    
    'the timer
    Private Sub Timer1_Timer()
       Timer1.Enabled = False
       Form2.Show vbModal
    End Sub
    Casey.

  3. #3
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Problem PopUpMenu

    I would also suggest you use Option Explicit Korku. If you don't know what it does or how to set it up then just ask. Or do a search for this, its been talked about many times.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    97

    Re: Problem PopUpMenu

    Using Option Explicit still failing.

    Resolving vbasicgirl, for the moment, it works. Thanks!!

    Greetings

  5. #5
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Problem PopUpMenu

    Quote Originally Posted by Korku
    Using Option Explicit still failing.
    Still failing the you've never use Option Explicit before then?

    Learn to use it and get used to it.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    97

    Re: Problem PopUpMenu

    Quote Originally Posted by Keithuk
    Still failing the you've never use Option Explicit before then?

    Learn to use it and get used to it.
    Always use this option but you know persists the problem

  7. #7
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Problem PopUpMenu

    Quote Originally Posted by Korku
    Always use this option but you know persists the problem
    Well you don't in your PopUpMenu.zip.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

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