Solved

customize (right click) pop-up menu

Posted on 1998-06-08
6
139 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 50 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 58
Spell Check in VB6 13 127
Zip Folders Using Chilkat Routines 1 58
Publisher:   Unknown     VB.exe Application 1 28
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…
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…
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…
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…

828 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