Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: PopUp menus


Message #1 by "Nuno Seco" <nseco@s...> on Fri, 26 Jan 2001 20:54:51 -0000
The popupmenu problem when openinga modal form from a popupmenu is a known
bug. See http://support.microsoft.com/support/kb/articles/Q167/8/39.asp for
more info.

Matt

-----Original Message-----
From: Nuno Seco [mailto:nseco@s...]
Sent: Saturday, 27 January 2001 7:55 AM
To: professional vb
Subject: [pro_vb] PopUp menus


I am having some problems using popup menus.

I want to show a form modally after the user clicks on a menu item from
a popup menu. Till here everything is OK. But on new form that appears i
want to do
the same thing but i canīt get the popup menu to appear. I think itīs
because this form is being shown modally and on the previous form the sub
that shows the first popup menu has not
ended execution yet.


Here is some code in that reflects what i am trying to say.

Nuno Seco

IN FORM 1
++++++++++++++++++++++++++++++++++

Option Explicit

Private Sub MenuItem1_Click()
    Form2.Show vbModal
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
If Button = 2 Then
  PopupMenu Me.aaaa     'aaaa is a menu
End If
End Sub


IN FORM 2
+++++++++++++++++++++++++++++++++++++
Option Explicit

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
If Button = 2 Then
'Here is the problem. The PopUp Menu does not appear!!

  PopupMenu Me.bbbb     'another menu but in this form
End If
End Sub

  Return to Index