What is the easiest way to dynamically disable events for a Control in VB.NET?
I need to disable events for a control in order to avoid recursion. What is the easiest way to dynamically disable events for a control (or other class with events) in VB.NET?
I'm familiar with the AddHandler and RemoveHandler implementation, but I was hoping for something a little less cumbersome. Something like the Application.EnableEvents method of VBA.
I guess thats a effortless, but effective way of doing it :) I must admit however that I had hoped for something like Form.DisableEvents = True to exist in .NET.