?
Solved

Create a popup menu

Posted on 2001-06-05
8
Medium Priority
?
196 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 53

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
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!

 
LVL 2

Accepted Solution

by:
chandukb earned 400 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

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!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

743 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