Solved

customize (right click) pop-up menu

Posted on 1998-06-08
6
131 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 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

12 Experts available now in Live!

Get 1:1 Help Now