Last Night, after a lot of head scratching, I was able to establish two-way communication between the WebBrowser Control and the main application window. It is necessary to capture events that take place in the webBrowser control which relies on run-of-the-mill Javascript and DHTML, and pass those events and data back to the parent application window for processing.

For example: when a span element in the webBrowser control containing a twitter screen name is clicked, the event is captured in the webBrowser control and the innerHtml property of the span element that triggered the event is sent back to the main app window where it is prepended with the “@” symbol and set as the text (@twitter_id) to start a reply to a twitter message.

This is good news and for TwitterPatter, an important function. Having the ability to capture events in the browser control and then pass them back to the main application opens the door for a lot of new options, features and user interactions.

Advertisements