I have 4 items in a ListBox and each item does a specific thing when it gets clicked on.
But I also want the double click event to do the same thing as the click event.
I can copy and paste all code from click event into double click event, but then you have lots of code crowding the code page doing the same thing. So what to do about this?
Example:
Private Sub listBox1_DoubleClick(ByVal sender As Object, ByVal e As EventArgs) _
Handles listBox1.DoubleClick
if listbox1.doubleclick then do the same thing in listbox1.clickevent
end if
End Sub
Try Following Code!