N
niteshs
Hi all I want to be able to disable all events for controls on my form
at runtime based on a certain condition and then re-add these events
back.
I have been able to view events through the EventInfo[] class
EventInfo[] events =
comboBox1.GetType().GetEvent("SelectedIndexChanged");
and then looping through these.
Type mydel =
comboBox1.GetType().GetEvent("SelectedIndexChanged").EventHandlerType;
I need to be able to disable all SelectedIndexChanged events
I need to do something like events.RemoveEventHandler(combobox)
Cheers nitesh
at runtime based on a certain condition and then re-add these events
back.
I have been able to view events through the EventInfo[] class
EventInfo[] events =
comboBox1.GetType().GetEvent("SelectedIndexChanged");
and then looping through these.
Type mydel =
comboBox1.GetType().GetEvent("SelectedIndexChanged").EventHandlerType;
I need to be able to disable all SelectedIndexChanged events
I need to do something like events.RemoveEventHandler(combobox)
Cheers nitesh