日期:2014-05-18  浏览次数:20756 次

IHTMLDocument2 引用
看到用户 caozhy 如下 关于获取选中的文本的代码
C# code


IHTMLDocument2 document = (IHTMLDocument2)webBrowser1.Document.DomDocument;
IHTMLTxtRange htmlElem = (IHTMLTxtRange)document.selection.createRange();
string s = htmlElem.InnerText; 




请教 C# 如何引用 IHTMLDocument2 ?
哪个命名空间 或要引用 哪个程序集?



------解决方案--------------------
引用COM浏览
C:\WINDOWS\system32\mshtml.dll
------解决方案--------------------
在COM中,选择Microsoft.mshtml

要是浏览的话,找mshtml