AxWebBrowserControl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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?= <[email protected]>
| Subject: AxWebBrowserControl
| Date: Sun, 11 Sep 2005 13:49:01 -0700
| Lines: 29
| Message-ID: <[email protected]>
| 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
|
 
Thuen,

In addition to Steven.

I can show you a sample how to get the HTML. However, a page is often not
one HTML doc. It exist from more seperated frames (docs).

Therefore in my idea your only change is to follow the advice from Steven
trying to copy the map on the screen.

I hope this little addition helps,

Cor
 
It seems like this type of request would be a-typical with alot of different
types of applications. Are there any plans to expose the rendering engine of
Internet Explorer, or create a dll or something similiar that would give this
type of accessibliity in applications.

I am glad that I came to the same conclusion that you did regarding the
limits of the current api's. I am going to give the whole form off the
screen thing a try, but I am concerned about the non-professional approach.

Best Regards,
Brian Thuen
 
Hi Brian,

As far as I know, IE will not expose the rendering engine. You can check
the link that Anders has provided.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
hi
I am new to this MSDN newsgroup. i can able to give you the code. which
will fullfill all your requirements.please contact me through
(e-mail address removed)

regards
rajesh
 
Back
Top