Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 有没有办法将System.Windows.Forms.HtmlElement转换为mshtml.ihtmlelement3?_C#_.net_Html_Vb.net - Fatal编程技术网

C# 有没有办法将System.Windows.Forms.HtmlElement转换为mshtml.ihtmlelement3?

C# 有没有办法将System.Windows.Forms.HtmlElement转换为mshtml.ihtmlelement3?,c#,.net,html,vb.net,C#,.net,Html,Vb.net,有没有办法将System.Windows.Forms.HtmlElement转换为mshtml.ihtmlelement3 --接受答案后编辑-- 这就是代码的样子 HtmlElement myElement = getElementByID(id); IHTMLElement3 h3 = (IHTMLElement3) myElement.DomElement; 谢谢@korchev将domeElement属性强制转换为mshtml.IHTMLElement3

有没有办法将System.Windows.Forms.HtmlElement转换为mshtml.ihtmlelement3

--接受答案后编辑-- 这就是代码的样子

HtmlElement myElement = getElementByID(id);
IHTMLElement3 h3 = (IHTMLElement3) myElement.DomElement;

谢谢@korchev

将domeElement属性强制转换为mshtml.IHTMLElement3