Click here to Skip to main content
13,046,679 members (61,967 online)
Rate this:
Please Sign up or sign in to vote.
I would like to MONITOR an HTML control (HtmlElement) inside a WebBrowserControl.
I would like to add EVENTS to the control in order to be notified whenever any EVENT got call(fire) on that control.
To simplify my needs here are 3 questions assuming the following single line of code:
var FirstDIV = webIE.Document.Body.GetElementsByTagName( "div" ).FirstChild();

1. How can I know WHAT events are listening (or attached) to FirstDIV?

2. How can I ADD an event(AttachEventHandler) to the TOP of the EVENT LIST in order to be called/notified BEFORE the current FirstDIV event handler? I will use that as a DEBUG just to know that the CONTROL receives/fires an envent.

3. Can I use reflection(C#) to ADD MY.LISTENING.EVENTS to the control current events so I can check whenever any EVENT is call(fire)?

Posted 12-Jan-12 3:51am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 12 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100