Solved

Create a popup menu

Posted on 2001-06-05
8
192 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
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 50

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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

813 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

10 Experts available now in Live!

Get 1:1 Help Now