PDA

View Full Version : Solved: Right double-click listbox



av8tordude
05-29-2011, 09:01 AM
What code can I use to Right double-click a listbox? Currently I have code that I can left double-click, but I would also like to Right double-click on the same listbox.

Thanks for your help.

mikerickson
05-29-2011, 09:47 AM
I don't know of any right double-click event, but you could look at the button argument in the Mouse Down event to make a right click event.

av8tordude
05-29-2011, 09:53 AM
can you offer an example? thanks

mikerickson
05-29-2011, 09:56 AM
Private Sub ListBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
If Button = 2 Then
MsgBox "right click"
End If
End Sub

av8tordude
05-29-2011, 10:09 AM
thank you Mike. it gives me an idea.