title: How to show a Context Menu when you right click a Menu Item
body: <p>I am porting an MFC application to .NET WinForms. In the MFC application, you can right click on a menu or on a context menu item and we show another context menu with diagnostic and configuration items. I am trying to port this functionality to .NET, but I am having trouble.</p>
  
  <p>I have been able to capture the right click, disable the click of the underlying menu and pop up a context menu at the right location, but the original menu disappears as soon as it loses focus.</p>
  
  <p>In MFC, we show the new context menu by calling <strong>TrackPopupMenuEx</strong> with the <strong>TPM_RECURSE</strong> flag.</p>
  
  <p><strong>ContextMenu</strong> and the newer <strong>ContextMenuStrip</strong> classes in .NET only have a <em>Show</em> method. Does anyone know how to do this in .NET?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have tried using <strong>TrackPopupMenuEx</strong> through a p/invoke, but that limits you to using a ContextMenu instead of a ContextMenuStrip which looks out of place in our application. It also still does not work correctly. It doesn't work with the new <strong>MenuStrip</strong> and <strong>ContextMenuStrip</strong>.</p>
  
  <p>I have also tried subclassing ToolStripMenuItem to see if I can add a context menu to it. That is working for <strong>MenuStrip</strong>, but <strong>ContextMenuStrip</strong> still allows the right click events to pass through as clicks.</p>