|
-
Apr 12th, 2006, 02:33 AM
#1
Screen-shooting large web pages
I wonder if this can be done in VB.
I'd like to make a screen capture of, say, a web page that doesn't fit into the screen and has a vertical scrollbar at the right side. Perhaps the current screen could be captured, a message could be passed to the other app (e.g. Firefox) to have it scroll down and so on?
I posted a similar question in the general pc forum here.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Apr 12th, 2006, 03:26 AM
#2
Hyperactive Member
Re: Screen-shooting large web pages
It IS possible, however, it is also VERY difficult (and beyond my scope)
Appart from subclassing the Browser, you'll have to also subclass the scrollbars, and calculate the increment and ranges so you know HOW much to scroll by, and how much pixels it moves the web page with every indent...
If my post has been helpful, then please rate it accordingly...
If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.
-
Apr 12th, 2006, 04:00 AM
#3
Re: Screen-shooting large web pages
..alternate idea1: (may be more convoluted )
Install a PDF/PS printer. Set it as default.
Print the webpage using that printer driver from Webbrowser control.
Now, convert (print) the ps/pdf file to jpeg using GhostScript. (command line)
..alternate idea2:
Convert the webpage to RTF. (Word Automation maybe able to do it. Not sure)
Load the RTF file in a RTB and make it VERY large.
Then print the contents of rtf to a picturebox using SelPrint method.
VB Code:
RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.AutoRedraw = True
RTB.SelPrint Picture1.hDC
Picture1.Picture = Picture1.Image
Last edited by iPrank; Apr 12th, 2006 at 04:06 AM.
-
Apr 12th, 2006, 04:38 AM
#4
Re: Screen-shooting large web pages
 Originally Posted by iPrank
..alternate idea1: (may be more convoluted  )
Install a PDF/PS printer. Set it as default.
Print the webpage using that printer driver from Webbrowser control.
Now, convert (print) the ps/pdf file to jpeg using GhostScript. (command line)
..alternate idea2:
Convert the webpage to RTF. (Word Automation maybe able to do it. Not sure)
Load the RTF file in a RTB and make it VERY large.
Then print the contents of rtf to a picturebox using SelPrint method.
VB Code:
RTB.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.Move 0,0,2000 * Screen.TwipsPerPixelX,2000 * Screen.TwipsPerPixelY
Picture1.AutoRedraw = True
RTB.SelPrint Picture1.hDC
Picture1.Picture = Picture1.Image
Yor first approach is ok, I often use pdf995. But, for now I don't like the idea of installing Ghostscript. I precisely uninstalled it recently as I wasn't using it.
The second idea seems more interesting. I suppose I'll have to play around with the rtb and picture dimensions.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|