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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to discriminate right from left click button

Status
Not open for further replies.

elquixiote

Technical User
Nov 30, 2002
99
MX
Hi! Could some body help me. I'm developing an application that uses the treeview control. Im trying to set an interfase depending on right click/left click from the mouse on the treeview control.

Is there a way to do that?.

Thanks,

el quijote ..
 
Private Sub Form_MouseDown()(Button as integer,Shift as Integer, X as Single, Y as Single)

if button = vbrightbutton then
msgbox "Right"
elseif button = vbleftbutton
msgbox "Left"
end if

Also might be worth knowing that lefty's can change a setting in windows to switch the buttons functionality, but I do not know if this is a big issue for your program.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top