How do you determine if an event has been assigned to a control

j2associates

Newcomer
Joined
Apr 6, 2006
Messages
6
Hello all,

I am using event handlers in a class I am writing and I want to add my own event hanldling if the control does not already have it. As an example, let's say I want to handle SelectedIndexChanged for a ComboBox if it is not currently trapping that event. How do I go about determining if a given ComboBox is already trapping SelectedIndexChanged? Thanks in advance for any ideas and/or suggestions!
 
VB event handling is a little different. In C#, events and delegates are treated exactly the same, where as VB has special syntax for events and hides the actual backing multicast delegate from the programmer. The VB RaiseEvent keyword automatically performs a check for null before invoking the delegate (in C# this must be done explicitly), but provides no mechanism to see if the event is wired as far as I know.
 
Back
Top