K
kellyhughes777
I need a working example of code to do this or some specific pointers
with the code below. I can provide more of the surrounding code block
if necessary.
I need my Application to be able to create a full page image of a
given web page. This will be used to perform a fax. I have located
several articles about this giving sample code using shdocvw.WebBrowser
to navigate to the target html and then grabbing the render object to
paint onto the device context of our choice.
ex.:
http://dotnetjunkies.com/WebLog/alan.dean/archive/2005/04/25/70496.aspx
http://blogs.msdn.com/rfarber/archive/2004/10/12/240943.aspx
I am currently attempting to use this method, but my problem is that I
can't get a valid IHTMLElementRender object so i can perform the
render.
It gives me an invalidcastexception. The (correctly?) implemented
fixes recommended in the rfarbers article aren't resolving the issue.
Here's the offending line:
Dim render As IHTMLElementRender = CType(elmnt, IHTMLElementRender)
Thanks for your help.
kelly
(Any VB or C# responses are welcome, WinForms or Web.
However, my app is a web app.)
Please pardon the cross post. I posted this question in another forum
but am not getting any
responses and my deadline is quickly approaching.
with the code below. I can provide more of the surrounding code block
if necessary.
I need my Application to be able to create a full page image of a
given web page. This will be used to perform a fax. I have located
several articles about this giving sample code using shdocvw.WebBrowser
to navigate to the target html and then grabbing the render object to
paint onto the device context of our choice.
ex.:
http://dotnetjunkies.com/WebLog/alan.dean/archive/2005/04/25/70496.aspx
http://blogs.msdn.com/rfarber/archive/2004/10/12/240943.aspx
I am currently attempting to use this method, but my problem is that I
can't get a valid IHTMLElementRender object so i can perform the
render.
It gives me an invalidcastexception. The (correctly?) implemented
fixes recommended in the rfarbers article aren't resolving the issue.
Here's the offending line:
Dim render As IHTMLElementRender = CType(elmnt, IHTMLElementRender)
Thanks for your help.
kelly
(Any VB or C# responses are welcome, WinForms or Web.
However, my app is a web app.)
Please pardon the cross post. I posted this question in another forum
but am not getting any
responses and my deadline is quickly approaching.