473,385 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1407
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.