Make a single sub that you call from each mouseclick event. Or if the
control's mouseclick events have the same function prototype (which they
probably do) you can just add handlers onto the same function
Sub Generic_MouseCick(Sender as object, .......) handles
Control1.MouseClick, Control2.MouseClick
'Popup
End sub
You could also use the Addhandler function to do it instead of the handles
keyword.
Chris
" Just Me" <gr****@a-znet.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have a usercontrol on which I have, say, five controls.
I want a context menu to popup when the mouse is clicked anywhere on the
userconttrol.
The same context menu.
What I've done in the past is to put code in each control's mouseup event.
Is that the way to go or is there a better way?
Thanks