读书人

IHTMLDocument2 引用,该怎么处理

发布时间: 2012-06-16 20:34:32 作者: rapoo

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

读书人网 >C#

热点推荐