Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make thumbnails in VB6?

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
Is there a way of using VB6 to make a thumbnail of a HTML page?

I want to show 10 different HTML pages all at once on a 1920 x 1200 monitor screen.

Assuming a webbrowser control can accept really tiny fonts sizes, I could analyse each HTML code and REPLACE the font sizes but I hoped it could be done directly to the control.
 
Hmm - interesting.

I think (I have not tried this ... yet) that I'd be tempted to use the IHTMLRenderElement interface's DrawToDC method to draw the page to either an enhanced metafile which we can then play back at a different scale (see my post in thread222-1387082 for an example of recording and playing back a metafile in VB) or to a DC that we have rescaled through SetWorldTransform (which I've previously illustrated for you to do a rotation, but can equally well be used for resizing)

The tricky bit is getting IHTMLRenderElement to work in VB ...
 
Ok - got a rather primitive version working now (it does some unwanted clipping, and only renders part of one HTML page - but I can get it to scale the render, and it seems to be a preety good faithful rendition of the original ...)

If I get some more time today I'll see if I can improve it to a presentable form
 
Hmm - isn't working as transparently as I'd like.

Can you outline your requirement a little better?
 
The application is for a two metropolitan railway stations each with 10 platforms.
Each platform departure LCD display currently shows a HTML page of information of various text sizes and graphics.
This is an unreliable system that often shows the wrong train arriving and will be replaced in a few years time.

There is a control room where staff can watch trains arriving on a CCTV system. They can make a correctional announcement if the wrong train arrives.

They want to see each HTML page reduced in size and superimposed or tiles with a camera picture of the arriving train so they can quickly correlate the passenger display with the right train.

They also want to show the 10 pages in miniature on one large screen.

Their current CCTV system can handle this, All I have to do is produce composite video signals of the reduced HTML page using a few computers with 10 PAL video outputs.
 
Can you not simply user InnerText to scrape the text from the HTML page and display it next to the camera image? It might even be readable at a small size...

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
The graphics are fixed items such as logos and could possibly be ignored.
Having never used "Inner Text", how does one actually apply this?

However I just found an example using java that seems to work!

Maybe I can incorporate this into my VB app.
 
That example works much better than what I was aiming for. I'd go with that, Ted.
 
Hmm
Cant think of how to incorporate the code within my vb6 app.

My app has to produce a composite video signal of the reduced input HTML page. I use a computer video card with a TV output.

The edges of the video output coincide with the edges of the webbrowser which is full screen.

After extracting the relevant stuff from the java code example, how do I process the HTML page in vb6 to show it shrunk in my webbrowser?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top