Re: Set / Clear and restore control event handlers
- From: "Lloyd Sheen" <a@xxx>
- Date: Sat, 14 Jun 2008 23:12:28 -0400
"Stephany Young" <noone@localhost> wrote in message news:OhLyomozIHA.3968@xxxxxxxxxxxxxxxxxxxxxxx
RemoveHandler ....
...
code which would cause the control to fire an event.
AddHandler ....
...
"Lloyd Sheen" <a@xxx> wrote in message news:%23geL1pmzIHA.1236@xxxxxxxxxxxxxxxxxxxxxxxIs 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
.
- Follow-Ups:
- Re: Set / Clear and restore control event handlers
- From: Cor Ligthert[MVP]
- Re: Set / Clear and restore control event handlers
- References:
- Set / Clear and restore control event handlers
- From: Lloyd Sheen
- Re: Set / Clear and restore control event handlers
- From: Stephany Young
- Set / Clear and restore control event handlers
- Prev by Date: Re: Dialog in DLL
- Next by Date: Re: Dialog in DLL
- Previous by thread: Re: Set / Clear and restore control event handlers
- Next by thread: Re: Set / Clear and restore control event handlers
- Index(es):
Relevant Pages
|