HtmlDocument转换IHTMLDocument2,求解?
我项目引用了C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll
但是在代码中写下面语句:
mshtml.IHTMLDocument2 HTMLDocument = (mshtml.IHTMLDocument2)this.webBrowser1.Document;
错误提示:
无法将类型“System.Windows.Forms.HtmlDocument”转换为“mshtml.IHTMLDocument2”