Hi Brian,
Welcome to MSDN newsgroup.
Regarding on the problem you mentioned, currently we haven't any better
means other than use the WebBrowser control to render the HTML and copy
form DC into bitmap. The internet explorer has exposed the mshtml
components for manipulate page DOM structure, however the rendering engine
and apis are not exposed so we can't directly render a HTML page without
using IE or webbrowser control. Also, since web page hasn't fixed width or
height, generally, I suggest you put the webbrowser control in to a
separate form which is enough large (you can set to 800x600) and then use
some WIN32 GDI api like the bitblt to copy the webbrowsers' screen into a
bitmap. If you don't want to let the webrowser window being displayed, we
can move it out of the desktop Screen's visible area by setting the left
and top property to negative value, however, since this is a undocumented
approach, we can't guarantee it always work among OS changes. In addition,
for such problem, the most perfect solution is create a HTML render
engine/component, just like what web browser used. But make such a engine
need huge time and work, if you have interests, you can consider having a
look at the Mozilla browser's HTML rendering engine since it's open source.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: AxWebBrowserControl
| thread-index: AcW3Ej1BemUgSRtWSoWdNH/tj+gvJQ==
| X-WBNR-Posting-Host: 68.40.2.90
| From: =?Utf-8?B?dGh1ZW5i?= <th****@nospam.nospam>
| Subject: AxWebBrowserControl
| Date: Sun, 11 Sep 2005 13:49:01 -0700
| Lines: 29
| Message-ID: <3B**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:49775
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Greetings everyone,
|
| I have been searching online, and trying diferent methodologies for about
a
| week now. The premis of what I am trying to do is as follows. I am
trying
| to get a graphic representation (thumbnail size) of an html document to
show
| up on my form.
|
| I have been trying to use the axWebBrowser control, and the mshtml.dll in
| order to accomplish this. But the only things I can come up with is a
screen
| shot of the axwebbroswer.
|
| I don't want the browser to actually appear on the form, and the size of
| screenshot will only show the visible portion of the axwebbrowser
control.
| So I am defiently on the wrong track. I started off using the picturebox
| control. But I think that using the printpreviewcontrol will better
serve
| me. I have tired using it, but I can't get the document into a graphics
| object. So I haven't really gotten anywhere using the printpreview
control.
|
| I know it is possible to get a preview of an html docuemnt because
Internet
| Explorer allows you to do it. Any help would be soooo appreciated.
|
| What I need is to get some vb.net code or vb.net documentation on getting
a
| graphic object from an html document. Keep in mind that I don't want a
| screenshot, because the html document will not be visible on my Form.
Only
| the thumbnail image or printpreview control will appear on the form.
|
| --
| Best Regards,
| Brian Thuen
|