静观其变

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

To send a string to the web browse control, you may want to go through the steps below:

1. Add a reference to the Microsoft HTML Object Library.

2. When form loads, use AxWebBrowser.Navigate method to navigate to "about:blank". (This way a new HTML Document is created.)

3. Make sure the document is loaded. (The DocumentCompleteEvent shows this.)

4. Get the AxWebBrowser.Document object and cast it to mshtml.IHTMLDocument2.

5. Set IHTMLDocument2.body.innerHTML property to the HTML string.

posted on 2005-02-25 00:08  wangyue  阅读(910)  评论(0)    收藏  举报