Results 1 to 2 of 2

Thread: Really Need Help on PopUp Menu

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    22

    Post

    Hi,
    I am trying to call a popup menu in a form that is shown with vbModal (with the show method)
    I stepped through the code, the application does excute the code at the correct place but just nothing shows up on the screen.
    The condition here is the form here must be shown in vbModal.
    Is there anyone who can provide me with a solution? thanks

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Should work just fine. Here is an example. I've created 2 forms (Form1 and Form2).
    Form2 has a menu mnuFile, which I'll use as a popup menu. On the command button (which is on the Form1) click event I'll show Form2 modally. Form2 has a code on KeyDown event:

    Form1
    Code:
    Private Sub Command1_Click()
        Form2.Show vbModal
    End Sub
    Form2
    Code:
    Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = vbRightButton Then PopupMenu mnuFile
    End Sub
    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

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