Hi SteveRichter,
>can I have an event handler called by a winforms control whenever any of the control's events are signaled?
Based on my understanding, you want to detect any fired events of a control. Could you please tell me why you want to detect all these events? May be we can find a better solution for this requirement.
Normally in an application, we just need to handle some events of a control. Attaching to all events could affect the performance. Besides, not all events share the same type of handler.
For example, button’s Click event is EventHandler type, while Button’s MouseClick event is MouseEventHandler type. You cannot register it to the same method.
As for nobugz’s suggestion, if you capture the Win32 message, you can hardly recognize which event is fired. And thanks for Rudedog and nobugz's contributions.
Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the
All-In-One Code Framework!