Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect a right click on a combobox

Status
Not open for further replies.

spence74

Programmer
Jul 16, 2004
34
0
0
US
Does anyone know how to detect a right click on a vb6 combobox?
 
There may be a way to do it using the API, but there isn't a direct way, since the Combo Box for reasons unknown to most doesn't support the MouseUp and MouseDown events. However, the DBCombo control does. So, use the DBCombo box instead, and use the MouseUp event. (Don't use the MouseDown event; if you need convincing of this, try rightclicking anywhere on this page and see if the menu pops up when the mouse button goes down or when it goes up.) Evaluate the Button argument and if [tt]Button = vbRightButton[/tt] then do what you're going to do.

HTH

Bob
 
You'll need to subclass ...

Rather than rehash the necessary info here's a link that may be useful: thread222-936065
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top