I am trying to write a program that traces every button press. I am doing it by tracing the clicks. The problem is that I also get when the form is clicked which I don't want. So I am trying to use the event.IsMulticast to see if my event handler that I assign while finding every thing that is clicked is the only one or if one was programed in also. But it's not working it's still picking up when people click on the form. Is there a better way to do this Do you even understand what I am talking about
mSequence = new WeakReference(sequence);
mID = component.ToString() + "_" + evt.Name;
evt.AddEventHandler(component, new EventHandler(HandleEvent));
if (evt.IsMulticast)
{
...
}
Here is some code to help you understand a little about what I am doing. I just need to know if control already has a "click" event handler.
Windows Forms30
|