Left/Right Click

How consider a right-button click as a left-button click (on a filelistbox for example ?) ?
deha2228Asked:
Who is Participating?
 
watyConnect With a Mentor Commented:
You have to use the mousedown event.

Add this code :

   If Button = vbLeftButton Then
      MsgBox "Left button pressed"
   ElseIf Button = vbRightButton Then
      MsgBox "Right button pressed"
   End If

0
 
deha2228Author Commented:
I know that but I try to choose a file in the filelistbox with the rightbutton, ...
0
 
watyCommented:
It could be possible by getting the item under the actual mouse position given in the MouseDown event, but why do you want to select with the right click, it is not Windows compliant...
0
 
wfordCommented:
I noted another question on disabling the windows popup on the right click in a file list box, perhaps that solution could be applied? What is you basic problem/requirement ?
0
 
dave_showCommented:
filelistbox's cannot use mousedown events,

I have found that you can copy filelistbox -> listbox , then use the listbox mousedown event.

Is there a way around this without having to move all those filelistbox names?

please advise
0
All Courses

From novice to tech pro — start learning today.