Taking a screenshot of webpage on firefox

ST3VO
ST3VO used Ask the Experts™
on
Hi all,

I need (from Delphi) to take a screenshot of a specified webpage as seen in firefox.

Not TWebBrowser as I already know how to do that.

Hope someone can help

thx

St3vo
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This is the first part of the answer

First if Firefox is your default Browser, you might want to build your next Web browser-like Delphi application using Mozilla ActiveX control instead of the (IE based) TWebBrowser.

This is the activeX control you need

http://www.iol.ie/~locka/mozilla/MozillaControl171.exe

Installing the Mozilla ActiveX Control
The Mozilla ActiveX Control requires files that do not ship with a standard GRE (or with Mozilla or Firefox) so the author provides a package that installs the GRE and support files and registers the control for you. An additional GRE is installed, even if the same version is already on your PC, in a directory you specify. I don't like this way of doing things because the installer requires user input which prevents us creating a seamless installer for our own applications. I plan to work out which files are required for a future article about installing the control with an application.

Importing the Control into Delphi
You can now import the control into Delphi in the normal way: Component | Import ActiveX Control | Mozilla Control 1.0 Type Library | Install. The control will appear on the ActiveX page of the Component Palette as TMozillaControl; it doesn't contain its own image so it will use Delphi's default one. The archive accompanying this article contains a *.dcr file that you can use to replace the generated one for a nicer image.

I've received reports from Chris Bensen at Borland that the control doesn't always show up in the Import ActiveX Control wizard in Delphi 7 and Delphi 2005. If this happens to you, start a command prompt, go to the directory where you installed the control and type regsvr32 mozctlx.dll. The control should now show up in the IDE as expected. Do not register any other DLLs!

Wait there is more

Author

Commented:
Got it! Thanks very much for your help :o)
Here you have an example of the component's usage.

http://www.paranoia.clara.net/downloads/taming_the_lizard.zip

Author

Commented:
THanks a lot! You're a star :o)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial