?
Solved

customize (right click) pop-up menu

Posted on 1998-06-08
6
Medium Priority
?
142 Views
Last Modified: 2010-05-03
I want to be able to create my own pop-up menu in vb5
So when a use right clicks on my form they get my menu
I need to be able to customize this menu aswell

thanks.............................yukun
0
Comment
Question by:yukun
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 200 total points
ID: 1462804
No problem..  Do this

1) In the menu designer, make a menu called mnuRC
2) Make it's visible property = false
3) Add the subitems you'd like below it
4) add this code to the mousedown event
 
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  if button and vbrightbutton then
     popupmenu mnuRC
End Sub


0
 
LVL 4

Expert Comment

by:martinag
ID: 1462805
If you want any of the subitems to be bold just do like this:
PopupMenu mnuRC, , , , mnuRCSub

mnuRCSub is the subitem that should be bold.
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1462806
cool Martin.. I did not know that.
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 4

Expert Comment

by:martinag
ID: 1462807
I'm honored.
I knew something but anthonyc didn't...
0
 

Author Comment

by:yukun
ID: 1462808
thanks Martinag!!!!!!!!!
0
 

Author Comment

by:yukun
ID: 1462809
and anthonyc!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

770 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