Solved

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

Posted on 2001-06-15
2
130 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now