首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

IHTMLDocument2 引用,该怎么处理

2012-06-16 
IHTMLDocument2 引用看到用户 caozhy 如下 关于获取选中的文本的代码C# codeIHTMLDocument2 document (I

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

热点排行