html document vb.net,HTML rendering in VB.Net

本文深入解析了浏览器的复杂性,介绍了如何通过WebBrowser控件操作HTML流,并提到了微软的DHTMLEditControl及其安全注意事项。作者建议先尝试常规方法,然后探索这个鲜为人知的OCX工具。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hi Dean,

No, you're not being dumb.

There are subtleties in the browser. It's a highly multilayered piece of software.

You may feel better if you open a new project and did this:

Dim wb as new webBrowser

and examined three properties:

wb.Document

wb.Documentstream

and

wb.Documenttext

If I am not mistaken, the webBrowser control can deal directly with that stream and I believe you can edit it and do what you like with that stream using MSHTML and the DOM model.

Also, if you are running a modern day version of windows, there is a strange little ocx and DLL on your system. It is the DHTML Edit control. It's half HTML editor and half webrowser and it's fairly remarkable.

Microsoft has had an SDK for it and it has been discontinued. However it's around on the net and is downloadable. The control is located (probably) on your system:

C:\Program Files\Common Files\Microsoft Shared\Triedit

But... there are caveats about this OCX especially around security. If you use it on the net and encounter a hostile script, it's capable of opening, reading and writing files under script control. There is a secure and non-secure version.

The name of the sdk on the net is:

dhedsdk.exe

But I would recommend that you exhaust all efforts with the current webBrowser first.

Renee

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值