Solved

customize (right click) pop-up menu

Posted on 1998-06-08
6
141 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 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

707 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