Solved

See this old question ... popup menus missing ....100 points

Posted on 2001-06-15
2
135 Views
Last Modified: 2010-05-02
0
Comment
Question by:costello
2 Comments
 
LVL 39

Accepted Solution

by:
appari earned 10 total points
ID: 6209349
i suppose you are loading this form from another popup menu click in the previous form. if that is the case it wont display the popup menu here. because at a time only one popup menu can be activated and if this form is a modal window it's won't display popup menu here

for example try this.

1. open a new project.
2. add two forms, form1 and form2
3. add following menus to form1.
     a    (Visible = true)
     ....a1
     b    (Visible = false)
     ....b1   (Visible = true)

4. add following code in form1

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu b
End Sub

Private Sub a1_Click()
Form2.Show 1
End Sub

Private Sub b1_Click()
Form2.Show 1
End Sub

5. add following menus to form2.
     a    (Visible = false)
     ....a1

6. add following code to Form2

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu a
End Sub    

7. now run the project. u can observe if you load the form from a1 click u can access popup menu in form2, but if u load form2 from b1 click it wont show form2's popup.

8.  now if u change the following code in form1 from

Private Sub b1_Click()
Form2.Show 1
End Sub

to

Private Sub b1_Click()
Form2.Show
End Sub

and run now u can see popup menu in both the cases whether u are clicking a1 or b1.

i suppose this helps you,

thank you,
Rao

0
 

Author Comment

by:costello
ID: 6267003
Hi Rao,

I see you have put a comment in both this question and the real question, but only after another comment was accepted.

Sorry for that, but for your effort, I'll award you 10 points here and an A.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question