[已解决] Web浏览器控件中的可查看html元素 [英] [Solved] View-able html elements in a web browser control
本文介绍了[已解决] Web浏览器控件中的可查看html元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我遇到以下问题:
==>我有一个WebBrowser控件,我想知道如何在给定时刻在WebBrowser控件上仅获取可见的html元素(链接,文本框等).
如果有人有想法,请在这里帮助我!
预先感谢,
塔玛什
更新:
由OP自己解决.答案已添加为注释.
Hello everyone,
I have encountered the following problem:
==> I have a WebBrowser control I would like to know how could I get only the visible html elements (links, textboxes, and so on ) at a given moment on the WebBrowser control.
If someone has an idea, please help me out here!
Thanks in advance,
Tamash
UPDATE:
Solved by OP himself. Answer added as comment.
推荐答案
只需将其从未答复列表中删除即可.
OP找到的解决方案:
我已经使用每个HtmlElement的ClientRectangle并检查范围是否在WebBrowser控件范围内,从而找到了解决该问题的方法. ( http://msdn.microsoft.com/en-us/library /system.windows.forms.htmlelement.clientrectangle.aspx [ ^ ])
Just to remove it from unanswered list.
Solution as found by OP:
I''ved found a solution to the problem using ClientRectangle of each HtmlElement and checking if the bounds are within the WebBrowser control bounds. (http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelement.clientrectangle.aspx[^])
这篇关于[已解决] Web浏览器控件中的可查看html元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文