problem with AxWebBrowser in Visual Studio 2003
i am using AxWebBrowser in C# project in visual studio 2003. i added an on_click event handler on the document in DocumentComplete event. code is given below
mshtml.HTMLDocument doc1=(mshtml.HTMLDocument)axWebBrowser1.Document;
mshtml.HTMLDocumentEvents2_Event eve=(mshtml.HTMLDocumentEvents2_Event)doc1;
eve.onclick+=new HTMLDocumentEvents2_onclickEventHandler(eve_onclic k);
its firing ok but the problem is this that if i click a text box, it doesnt get the focus and i cannot type in it. then i removed this handler from DocumentComplete event handler and all the things returned to normal. i mean to say that text boxes got their focus.i then put the same code in NavigateComplete2 event and it seized to work again.
i will be very thankfull if anyone can help me out here.
|