Solved

Create a popup menu

Posted on 2001-06-05
8
194 Views
Last Modified: 2012-05-04
I have a form within a class.  I want to create a popup menu for this form.  I don't want the menu to be dependent on the project form.  I want it contained within the class.

It seems that the menu is not a VB control type.

I have a ListView with a CommandButton over it.  I want a popup menu to appear when someone right-clicks on the CommandButton.

The problem is that I can't find a way to create a menu from within my class.  Since the only way to use the PopupMenu method is to have a menu associated with a form it is difficult to find a way around this.

Any suggestions would be appreciated.

Thanks!

Rich

0
Comment
Question by:RichW
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Expert Comment

by:OTveit
ID: 6156352
You can create your own menu using another form within the same class and use the Show/Hide methods inside the command buttons Mouse down/up event.


:)
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6156382
0
 
LVL 4

Author Comment

by:RichW
ID: 6156435
I know, but I was hoping instead that there was a way to create a popupMenu from the form in my class instead of creating a form.

I could also do it with a label.  

I think the answer is no.

Thanks anyway.


0
Technology Partners: 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!

 
LVL 2

Accepted Solution

by:
chandukb earned 100 total points
ID: 6156443
Hi,

Another Link:

http://www.planet-source-code.com/xq/ASP/txtCodeId.14792/lngWId.1/qx/vb/scripts/ShowCode.htm

I am using this in my VB Project, and it's great.

Chandu
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6156522
Don't give up so quickly....
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6156532
Hi!

I don't know if this would be applicable to your question, but, just in case this is what you're actually trying to achieve...

I you want to popup the menu (which is called MyMenu) from Form1 IN Form2, in form2, simply add this code:

PopupMenu Form1.MyMenu

That's it!

glass cookie : )

PS Ignore me if this is inapplicable
0
 
LVL 4

Author Comment

by:RichW
ID: 6156534
Thanks chandukb.  That was what I was looking for.

Thanks again.

RichW
0
 
LVL 4

Author Comment

by:RichW
ID: 6156561
Thanks everyone for your input!

RichW
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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

734 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