Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

910 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

20 Experts available now in Live!

Get 1:1 Help Now