HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
How to Capture Entire Document to image in web control
Posted by: HyunKwan,Song (211.189.124.---)
Date: Tuesday, 26-Nov-2002, 07:16:54

the Html Editor Control is very nice.

and I need,

Capturing entire browser document to image in web browser.

how do i do?

for example.

i want to capture browsed webcontents to jpg image or to gif image.
and this image is entire webpage image !


Re: How to Capture Entire Document to image in web control
Posted by: Tim Anderson (
Date: Tuesday, 26-Nov-2002, 08:39:13

There's some code at:


which explains how to save a form image to a bitmap. I was able to adapt this easily to capture the contents of the htmlEditor control.

If part of the page is scrolled out of view, you would have a problem.


Re: How to Capture Entire Document to image in web control
Posted by: Tim Anderson (
Date: Tuesday, 26-Nov-2002, 14:24:34

There is another approach to this which is based on IViewObject. There is code around to do this in C++ and Delphi, and it shouldn't be too difficult to do in C#; in fact I think someone on one of the newsgroups has already done it with this method. However, note this comment in MSDN:

I've commented on this in the Forum. The key would be to get a .Net wrapper for IViewObject; or else to call the API function OLEDraw which does the same thing. It would be quite interesting if someone could build this functionality into the control, or else post some code. However, it is likely to be memory intensive. Also note this warning from MSDN:

... this technique falls into unsupported territory. The problem is that the product is really not designed or tested to support custom drawing via IViewObject:grinning smileyraw. IViewObject:grinning smileyraw is a generic ActiveX control interface that is only intended to allow a container that is directly hosting the control to ask that control to draw itself. Here we are using this interface to ask the control to draw itself into some other location. Therefore, it is possible that this technique will not work properly in future versions of Internet Explorer due to drawing optimizations or other modifications made to the product at a later date. In fact, since the WebBrowser control is a windowed control, it normally handles its own painting when hosted in a container without using IViewObject:grinning smileyraw at all.


Your Name: 
Your Email: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.