Here is something I researched and found. it doesn't seem intuitive as I don't know why they don't have a RightClicked event. Create a listbox(i.e. just serving as an example of a control you might use) on your form/whatever and call it lstResults. Here is some sample code:
vb Code:
Private Sub lstResults_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstResults.MouseUp If e.Button = Windows.Forms.MouseButtons.Right Then MsgBox("You right clicked on the ListBox") End If End Sub




Reply With Quote