Solved

customize (right click) pop-up menu

Posted on 1998-06-08
6
136 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 / DAO 3.6 / run time error: Couldn't find installable ISAM 7 94
Excel VBA combine two working workbooks 8 54
VBA error replacing data 6 40
Spell Check in VB6 13 112
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…
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 …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

773 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