I have a panel that contains a lot of images. Each graphic box registered a context menu contextRightMenu.
What I want when the context menu appears is to get the current mouse position.
I tried to get a mouseposition using mouseDown and click, but these events occur after clicking one of the context menu items, and it's too late.
the popup event of the context menu does not pass the arguments of the mouse events, so I donβt know how to get the mouse pointer.
If I can get the mouse event arguments, this is easy.
Then I just can:
this.contextRightClick.Popup += new System.EventHandler(this.contextRightClick_Popup);
Can someone help me either get some arguments for the mouse events, or suggest an event that will be executed before the context menus appear?
Thanks in advance
c # event-handling compact-framework location
Ikky
source share