与Visual Studio 2003中的AxWebBrowser控件相关的问题 [英] problem relating AxWebBrowser control in Visual Studio 2003

查看:66
本文介绍了与Visual Studio 2003中的AxWebBrowser控件相关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#项目中使用AxWebBrowser。我在Document Completed事件上的文档上添加并单击事件处理程序。代码如下:

mshtml.HTMLDocument doc1 =(mshtml.HTMLDocument)axWebBrowser1.Document;

mshtml.HTMLDocumentEvents2_Event eve =(mshtml.HTMLDocumentEvents2_Event)doc1;

eve.onclick + = new HTMLDocumentEvents2_onclickEventHandler(eve_onclic k);


它的射击确定但问题是,如果我单击一个文本框,它不会得到焦点,我不能输入它。

如果有人可以帮助我,
i将非常感谢。

i am using AxWebBrowser in C# project. i add and on click event handler on the document on Document Completed 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.

i will be very thankfull if anyone can help me out here.

推荐答案

这个onclick事件做了什么?
What does this onclick event do?


它获取了点击的元素,然后在从返回的html创建的Treeview中搜索并返回相同的那个。



i删除了这个处理程序DocumentComplete事件处理程序并且所有东西都恢复正常。我的意思是说文本框得到了他们的焦点。然后将相同的代码放在NavigateComplete2事件中并且它再次被抓住了。
it gets the element clicked, then search in the Treeview created from html returned and returns wether its the same one or not.



i removed this handler 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.


请发布事件的代码,我假设你意味着停止。
Please post the code for the event, I assume that you mean ceased.


这篇关于与Visual Studio 2003中的AxWebBrowser控件相关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆