none
popup menus not working

    Question

  • I'm using VB 6 and have a strange problem with popup menus that I can't figure out.
    Outline of the problem:  I have two forms, say A and B.  Form B is launched
    as a modal dialog from form A.  If I use a command button on form A to
    launch form B (using code below), then a popup menu on form B works fine:
        ---------
        Private Sub Command1_Click()
            Form2.Show 1
        End Sub
        ---------
    However, if I use a popup menu (menu is named "menuAddSP"; menu item is
    named "menuNewSP") from that same command button on form A to launch form B
    (using code below), that same popup menu on form B does not work - no errors or anything,
    the popup menu just doesn't appear at all at runtime:
        ---------
        Private Sub Command1_MouseUp (Button As Integer, Shift As Integer, X As
    Single, Y As Single)
            PopupMenu menuAddSP
        End Sub
        ---------
        Private Sub menuNewSP_Click()
            Form2.Show 1
        End Sub
        ---------

    ALSO:  I just discovered that if form B is launched as a non-modal window from the popup menu on form A, form B's popup menu works fine; but if form B is modal, as said above, its popup does not appear.

    any ideas about what the problem could be?

    thank you!
    Thursday, October 20, 2005 4:25 PM

Answers

All replies