How to load HTML into browser object?
Posted on 2005-04-06
Currently, I follow a URL, render that in the browser object and get the width. For example:
' after the above loads, I get the width
Dim oBody As mshtml.HTMLBody = DirectCast(AxWebBrowser1.Document.body, mshtml.HTMLBody)
Me.Label1.Text = "Width = " & oBody.scrollWidth & vbCrLf & "Height = " & oBody.scrollHeight
I don't want to reach a site anymore. I have an HTML page that I'd like to load into the browser object and get the width. All the HTML is in a string variable. So I'm replacing traversing a URL for loading HTML content. No user's will see this so it is ok to be in a class for DLL compilation. How do I render the HTML content in the browser objecct?