M
Michael C
Interesting. That method was taken largely from an example on the MS
website... Guess they need to fix their samples and use their methods in a
more correct fashion. Got any examples of code using IPersistMemory? Noah
Coad published a WebBrowser wrapper control that exposes properties to
assign the HTML directly. His code is at
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=312. I
don't believe he defines IPersistMemory either.
Thanks,
Michael C., MCDBA
website... Guess they need to fix their samples and use their methods in a
more correct fashion. Got any examples of code using IPersistMemory? Noah
Coad published a WebBrowser wrapper control that exposes properties to
assign the HTML directly. His code is at
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=312. I
don't believe he defines IPersistMemory either.
Thanks,
Michael C., MCDBA
Nicholas Paldino said:Personally, I wouldn't use that method, as I don't believe it was
intended for this.
Rather, what I would do is define the COM interface IPersistMemory in
your assembly. You can find the definition in Ocidl.idl. Once you have
that, you can cast the value returned from the document property (after you
navigate to about:blank to get an instance loaded) to this interface and
then call Load in order to load the document from memory.
The thing here is that it expects a pointer, in which case, you will
have to copy the content to unmanaged code, or you will have to use unsafe
code to fix the location of the data in memory and then make the call.
Hope this helps.
Michael C said:I posted some code to do this already. The post is called "Re:
AxSHDocVw.AxWebBrowser Component Question", the date was 10/9.
Thanks,
Michael C., MCDBA
wroteJohn Lee said:Hi, Nick,
Could you please show me the code how you can feed html or xml to the web
browser in memory? I can only do it by creating a temp file and supply
the
url. ..
Thanks!
John
"Nicholas Paldino [.NET/C# MVP]" <[email protected]>
inwastemessage Michael,
I don't understand why you wouldn't use the webbrowser? How are you
trying to feed the HTML to it? It's pretty simple, you can do it through
memory, or through a file, or through a number of other mechanisms.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Anyone know of a good HTML Rendering control? I need a control that will
render and display HTML in a Windows form. It doesn't need to pull down
HTML pages from the Web - I'll feed it all the HTML it needs to display.
I've already spent way too much time trying to get the Microsoft
WebBrowser
control to work, and I have too many other things to work on to
anymore time on it. If you know of any third-party HTML Renderers out
there,
please let me know.
Thanks,
Michael C., MCDBA