I have a use case where any text box created in the application should be handled and some events should be listened to. I checked the ControlCollection, it does not seem to have a “created” or “modified” events. Also MessageFilter could not receive any create, or destroy events. Is this an optimal way to receive messages or windows hook will be the only alternative?
Share
The Control class has the Disposed event. You could wire that up to detect that the control got disposed. It is more reliable than the ControlAdded/Removed events since adding or removing a control doesn’t automatically means it is being disposed.