Handle how to ?

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi
How to know if a control has an handle.
To be more clear, sometimes I have to remove handle using
RemoveHandler MyControl.Leave, addressOf MyControl_Leave
and use AddHandler MyControl.Leave, addressOf MyControl_Leave

But before using the AddHandler, is there a way to know if the handle is not
yet active ?

Stan
 
Maybe this will help you:

For example you habe a own Click Event:


Event Click()


Then you can get all active delegates with this:

Dim delegateItem As System.Delegate
For Each delegateItem In ClickEvent.GetInvocationList

Next


There is always a "hidden" Property "Eventname" plus the Word "Event".
See example above:

Event Click() then bame is ClickEvent

if name is KeyUp then KeyUpEvent
 
Back
Top