In Delphi, Anyone know a quick way to scale / shrink TWebBrowser?

I just want to shrink the WebBrowser component.  Say, from 800x600, to 100x60 or whatever.

I was hoping that it would have like a SCALE property and I could just type in, say, 25% and whichever page I was on would be a little thumbnail version of the webbrowser.

but it looks like its not so simple...

some methods seem to involve capturing the bitmap first and then scaling that in its place...

ideas?
toratoratoraAsked:
Who is Participating?
 
cyberkiwiConnect With a Mentor Commented:
I take back part of what I said, IE8 can do the scaling zoom (not text) and it goes to as small as 10%.
It does not look like the TWebBrowser control, and the underlying WebBrowser Control, exposes it

http://msdn.microsoft.com/en-us/library/aa752085(VS.85).aspx

But, you can access the underlying IWebBrowser and use the technique shown below (c#/vb code)

http://slingkid.blogsome.com/2007/04/13/ie-zoom/

Or, you can always cheat and access the document DOM and modify the body tag and add following style in body tag
<body style="zoom: 10%">
0
 
cyberkiwiCommented:
The TWebBrowser is a wrapper and uses IE controls behind the scenes.
Therefore what IE cannot do (shrink to thumbnail size), TWebBrowser also cannot do.

>>some methods seem to involve capturing the bitmap first and then scaling that in its place...
Yes that will scale the static image captured, but you can't interact with it.
0
 
toratoratoraAuthor Commented:
ha ha




tricky

thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.