ContextMenu visiblechanged event???

  • Thread starter Thread starter Michel Hardy
  • Start date Start date
M

Michel Hardy

Hi, is there a event to know when a contextmenu is closed,
either by pressing escape or clicking on an item in the
menu.

Thanks

Michel
 
I finally found a way... If it can help someone, here is
how I did it.

Instead of binding the context menu with a picturebox, I
am binding it with the form itself. I use the form
MenuComplete Event to know when the context menu is
closed. I am still showing the menu from the MouseDown
Event of the picturebox. And to have the menu displayed at
the cursor position, I am converting the MouseEventArgs
values e.x and e.y to screen values with the picturebox
PointToScreen method and converting them back with the
form PointToClient method.
 
Back
Top