Getting Started
 Next

Version 6.0
Apprehend (TASGScreenCapture) is a non-visible component for Delphi 4-Delphi XE2 to capture images from the screen. Version 6 of Apprehend was tested and built with Delphi 2010.  Apprehend has not been tested with Delphi XE or XE2, by the author, but end users report sucessful installs with those compilers.  FireMonkey and 64-bit versions of Apprehend are not supported.
 
Apprehend has been tested with TImage, ImageEn's TImageENView and TImageEnVect and Envision's TImageScrollBox components. Demos with source for the TImage, TImageENView, TImageEnVect and TImagePainter components are available in the Apprehend zip file. Apprehend has been designed to work with most any image library. Source code and plenty of demos are included. Updates are not scheduled, but may occur. Check http://www.frontiernet.net/~w2m/index.html for updates. Check the blog for further information: http://williamwmiller.wordpress.com/
 
To use Apprehend all you have to do is place Apprehend on the main form of a project and make one function call to return a TBitmap of the captured image. With Apprehend you may capture the desktop, capture a bitmap image of the active window, capture a bitmap of a selected object (Window, button... toolbar), capture a bitmap of a selected area, capture a bitmap of a selected polygon area, capture a Large Icon (64x64), Icon (32x32) and Small Icon (16x16) rectangular selection or capture a user specified size rectangular selection with these simple functions:
 

Functions

function CaptureDesktop: TBitmap;
Description
Capture the entire screen or desktop and return image as a bitmap.

function SpeedCaptureDesktop: TBitmap;
Description
Quickly capture the entire screen or desktop and return image as a bitmap without any flicker.

function CaptureActiveWindow: TBitmap;
Description
Capture the active window and return an image as a bitmap

function CaptureObject: TBitmap;
Description
Capture the user selected object (icon, button, toolbar, status bar) and return a s a bitmap.

function CaptureSelection: TBitmap;
Description
Capture the user selected rectangular area of the screen and return a bitmap.

function CapturePolygon: TBitmap;
Description
Capture the user selected polygon area of the screen and return as a bitmap.

function CaptureLargeIcon: TBitmap;
Description

Capture the user selected 48x48 pixel area of the screen and return as a bitmap.

function CaptureIcon: TBitmap;
Description
Capture the user selected 32x32 pixel area of the screen and return as a bitmap.

function CaptureSmallIcon: TBitmap;
Description
Capture the user selected 16x16 pixel area of the screen and return as a bitmap.


function
CaptureSpecificSizeSelection:TBitmap;

Description
Capture the user specified size selected area of the screen and return as a bitmap.

property: Minimize: Boolean
Description

To automatically minimize the main form of the application before a capture and to automatically restore the main form, set the Minimize property to true. If you set minimize property to false, the image will include the application window. Typically the minimize property will be set to true.

property: Auto: Boolean
Description
To automatically copy the captured image to the clipboard, set the auto property to true.

Property:
Delay: Boolean
Description
To change the time between minimizing the main form and the time that the snapshot takes place set the delay property. Usually from 50 to 500 is a good setting.
 
property: ShowCursor: Boolean
Description
To include the screen cursor in a capture of the desktop set the show cursor property to true.

Example of Capturing the Desktop
procedure CaptureDesktopClick( Sender: TSender );
var
BMP: TBitmap;
begin
    // Set the ScreenCapture Component Properties or use properties set in the IDE
    ASGScreenCapture1.Minimize := True;
    ASGScreenCapture1.Auto := True;
    ASGScreenCapture1.Delay := 500;
    try
    // Capture an image of the desktop and assign it to a bitmap
    BMP.Assign( ASGScreenCapture1.CaptureDesktop );
    // Assign the bitmap to a TImage or another image component
    Image1.Picture.Bitmap.Assign( BMP );
    // Refresh the Image component to display the image
    Image1.Resfresh;
    finally
    // Free the temporary bitmap
    BMP.Free;
    end;
end;


Apprehend was written with Borland's Delphi 5-Delphi 2010. Apprehend has not been tested with earlier versions of Delphi or versions of Delphi after Delphi 2010 by the author. Other programmers have successfully installed Apprehend and compiled the Apprehend demos with Delphi 4. Other authors report that Apprehend will not install in Delphi 3.

To run the TImage demo install the Apprehend package for the respective version of Delphi. Apprehend may work in Delphi 2005 and with Delphi XE and Delphi XE2; however, no packages have been provided. Apprehend has not been built for Net nor has it been tested on Delphi 2005, Delphi XE or Delphi XE2.  A 64-bit version is not available.


Demos
TImage built with Delphi 7
TImageENView with Delphi 7 and ImageEN.  You must install both Apprehend and ImageEN packages before loading this demo into Delphi.
TImageENVect with Delphi 7 and ImageEN.  You must install both Apprehend and ImageEN packages before loading this demo into Delphi.


Copyright © 1986-2012 by Adirondack Software & Graphics