It seems that this can be done using the special events defined here .
' Define the MouseDown event property. Public Custom Event MouseDown As MouseEventHandler ' Add the input delegate to the collection. AddHandler(Value As MouseEventHandler) listEventDelegates.AddHandler(mouseDownEventKey, Value) End AddHandler ' Remove the input delegate from the collection. RemoveHandler(Value As MouseEventHandler) listEventDelegates.RemoveHandler(mouseDownEventKey, Value) End RemoveHandler ' Raise the event with the delegate specified by mouseDownEventKey RaiseEvent(sender As Object, e As MouseEventArgs) Dim mouseEventDelegate As MouseEventHandler = _ listEventDelegates(mouseDownEventKey) mouseEventDelegate(sender, e) End RaiseEvent End Event
source share