Click to See Complete Forum and Search --> : Loading HTML doc


Limor Janah
September 14th, 2005, 07:21 AM
Hi,

I am trying to open a HTML file from a window application.
I need to get a handler to the HTML document
so I'll be able to approach the dom and manipulate it (the dom)
like inserting HTML code….

Any suggestions?
Limor

hspc
September 16th, 2005, 04:21 AM
-first you need to add a reference to Microsoft.mshtml(Microsoft HTML Object Library)
-then declare a document object (instance of HTMLDocumentClass Class)
-use the browser control's Navigate2 method to navigate to the page you want (put the URL = "about:blank" if you don't want an blank page)
-Handle the DocumentComplete event of the browser control and set the document object:doc=CType(webbrowser.Document,HTMLDocumentClass)