void_loginBrowser_Navigated(objectsender, WebBrowserNavigatedEventArgse)
{
vardoc = (sender asSystem.Windows.Forms.WebBrowser).Document;
mshtml.IHTMLWindow3rawWindow= (mshtml.IHTMLWindow3)doc.Window.DomWindow;
rawWindow.attachEvent("onmessage",new DHTMLEventDelegate(MyEventHandler));
}
public delegate void DHTMLEventDelegate(IHTMLEventObj e);
public void MyEventHandler(IHTMLEventObje)
{
//this is not firing
}
mshtml.IHTMLWindow3rawWindow= (mshtml.IHTMLWindow3)doc.Window.DomWindow;
// rawWindow.attachEvent("onmessage", OnLoadListener);
rawWindow.attachEvent("onmessage", new DHTMLEventDelegate(this.YourEventHandler));
I don't seem to resolve IHTMLEventObj5(which MSDN says will contain message data) even though I have MSHTML.dll ver10.0 .
Please help me in attaching this event as I need to receive the JSON data through this event only .