I'm really having trouble displaying a custom context menu with a right click: Erroneous behavior from ContextMenu
I was still a little different:
private void lstModules_MouseDown(object sender , MouseEventArgs e) { hitTest = lstModules.HitTest(e.Location); switch (e.Button) { case MouseButtons.Right: if (hitTest != null && hitTest.Item != null) {
source share