"Stephany Young" <noone@localhostwrote in message
news:Oh**************@TK2MSFTNGP04.phx.gbl...
RemoveHandler ....
...
code which would cause the control to fire an event.
AddHandler ....
...
"Lloyd Sheen" <a@b.cwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Is there a way to get the event handlers such that I can cache the info
about handlers for a particular control, remove the handlers, do some
code and restore the cached event handlers in VB.NET (2008).
I would rather do things this way than having to have a boolean flag to
indicated to the handler to exit right away.
Psuedo code:
CacheHandlers(control)
code which would cause the control to fire an event.
RestoreHandlers(control).
LS
Yes I know about the "norm" but what I am looking at doing is for a control
(any control) to have a way of removing and then after some code restoring
the event handlers. I am looking for a general method which would take into
account that I would not know what to use for Addhandler and RemoveHandler
so I am looking for a method to enumerate the "added" handlers and then
cache the info, do a remove and when asked reset using AddHandler.
LS