Not a .NET way but a native way
Inherit ListView, override WndProc and listen for a HDN_ITEMCLICK
notification
Public Const NM_RCLICK As Integer = -5
Public Const WM_NOTIFY As Integer = &H4E
<StructLayout(LayoutKind.Sequential)> Public Structure NMHDR
Public hwndFrom As IntPtr
Public idFrom As Integer
Public code As Integer
End Structure
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_NOTIFY Then
Dim nm As NMHDR = CType(m.GetLParam(GetType(NMHDR)), NMHDR)
If nm.code = NM_RCLICK Then
Debug.WriteLine("Right button clicked")
End If
End If
MyBase.WndProc(m)
End Sub
/claes