I am trying to use MSHTML without the webbrowser and I am having a few
problems. Right now all I am trying to do is load an URL(html page) and
access its innerhtml.
What I have is:
Dim doc As mshtml.HTMLDocument = New mshtml.HTMLDocument()
Dim d1 As mshtml.IHTMLDocument4 = doc
Dim d2 As mshtml.IHTMLDocument4 = doc
d2.write("<html><body>test</body></html>")
d2.close()
MsgBox(d2.body.innerHTML)
d2 = d1.createDocumentFromUrl("http://www.msnbc.com", "")
MsgBox(d2.readystate)
It seems like I am able to load the url correct (ran a packet sniffer),
however, I cannot figure out how to detect that it has completed. I looked in
the web and there were some old examples using:
While d2.readyState <> "complete"
DoEvents
End While
But when I tried it started using 100% of the cpu and it never ended.
Any suggestions/ideas? Also can you point me to any good tutorials that
explain how to use of mshtml and vb.net
thanks