I've reached the conversion of a part of my application from VB6 to VB.NET
which uses the COM Web Browser control to display HTML content generated by
my application.
The general approach used in VB6 is as follows:
Open the form containing the browser
Wait a few seconds for the Browser.Document property to initialise
With the Document object, call the following methods:
.Clear()
.Open()
.Write(html)
.Close
This all works perfectly in VB6. In VB.NET however, I've been completely
unable to get this to work. The Document property of the Browser control is
always Nothing and no matter how long I wait it doesn't ever get set to an
object.
I also tried calling the Navigate() method of the browser object, and also
dropping URLs from other web browser windows into the browser control. In
each case a System.Runtime.InteropServices.MarshalDirectiveExc eption
occurred with the message, "Marshaler restriction: Excessively long string."
Is there something special I need to do in order to use the Web Browser
control in my project?
Can anyone point me to some sample code that displays application-generated
HTML within the browser?
I could really use some help here as this is a critical part of my
application, without it my project will fail. :(
Thanks in advance,
--
(O)enone