473,473 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

AxWebBrowserControl

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
Sep 11 '05 #1
6 1408
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
|

Sep 12 '05 #2
On Sun, 11 Sep 2005 13:49:01 -0700, thuenb wrote:
What I need is to get some vb.net code or vb.net documentation on getting a
graphic object from an html document.


Maybe this will help you:
http://www.developerfusion.co.uk/show/4712/

// Anders
--
English isn't my first, or second, language.
So anything rude or strange are due to the translation
Sep 12 '05 #3
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
Sep 12 '05 #4
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
Sep 12 '05 #5
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."

Sep 13 '05 #6
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
fr********@yahoo.com

regards
rajesh
Oct 28 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ReidarT | last post by:
I have made a simple application that opens a web-page through a axWebBrowserControl. This works OK on some PC's but not on other. They have Win XP, SP2 installed. regards reidarT
6
by: thuenb | last post by:
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.