[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Create a popup menu

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

Industry Leaders: 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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
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…
Suggested Courses

649 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