hi all,
I have many controls in a windows form app. currently, I am using "Hide()", when controls are not to be used.
Some of these controls implement Event Handlers.
If I were to Disable the control, as well as hide, would this improve the application performance, eg. enabling the controls only presently needed?
would the EventHandlers for disabled controls be frozen or stopped?
Thanks in advance for your response,
Jeremy
Loading
Posted Dec 18, 2007, 12:35 PM
If you need to, you can always simply change the "Visible" property of the control to false, which has less overhead than disabling the control and will keep the user from activating it.
As for the event handlers, they will never be triggered by a user unless some other control attempts to activate the hidden or disabled control and indirectly triggers the event handler. Event handlers are tied to the control specified whether or not its enabled or disabled.