CaptureArea Example for Delphi 4.0

This is also the example for the ScaleMode property, CaptureAreaDrawCursorIndex property, CaptureAreaFillPattern property, CaptureAreaDrawLineStyle property, CaptureAreaDrawEllipseWidth property, CaptureAreaDrawEllipseHeight property, CaptureAreaInfoLeft property, CaptureAreaInfoTop property, CaptureAreaInfoHeight property, CaptureAreaInfoWidth property, CaptureAreaShowDrawCursor property, CaptureAreaIncludeCursor property, CaptureAreaEnableKeyboard property, CaptureAreaShowOpaqueText property, CaptureAreaShowCursorPosition property, CaptureAreaShowAreaSize property, CaptureAreaShowInfoWindow property, CaptureAreaSensitiveInfoWindow property, CaptureAreaBitmapWithRegion property, CaptureAreaZoomFactor property, CaptureAreaFillForeColor property, CaptureAreaFillPattern property, CaptureAreaFillBackColor property, CaptureAreaDrawLineColor property, CaptureAreaTextForeColor property, and CaptureAreaTextBackColor property.


    {show area info window}
    LEADScr1.CaptureAreaShowInfoWindow := True;
    {show area size during capture}
    LEADScr1.CaptureAreaShowAreaSize := True;
    {enable sensitive  area info window}
    LEADScr1.CaptureAreaSensitiveInfoWindow := True;

    {set zoom factor}
    LEADScr1.CaptureAreaZoomFactor := 3;
    {position capture area info window}
    LEADScr1.CaptureAreaInfoTop := 100;
    LEADScr1.CaptureAreaInfoLeft := 100;
    {size the capture area info window}
    LEADScr1.CaptureAreaInfoWidth := 100;
    LEADScr1.CaptureAreaInfoHeight := 200;

    {set colors}
    LEADScr1.CaptureAreaDrawLineColor := clBlack;
    LEADScr1.CaptureAreaTextForeColor := clBlue;
    LEADScr1.CaptureAreaTextBackColor := clBlack;
    {capture with a region}
    LEADScr1.CaptureAreaBitmapWithRegion := True;

    {show cursor position with opaque background}
    LEADScr1.CaptureAreaShowCursorPosition := True;
    LEADScr1.CaptureAreaShowOpaqueText := True;

    {disable keyboard}
    LEADScr1.CaptureAreaEnableKeyboard := False;

    {do not include cursor in captured image}
    LEADScr1.CaptureAreaIncludeCursor := False;

    {setup the background}
    LEADScr1.CaptureAreaFillBackColor := clRed;
    LEADScr1.CaptureAreaFillForeColor := clBlue;

    LEADScr1.CaptureAreaFillPattern := bsDiagCross; 
    {capture a round rect}
    LEADScr1.CaptureAreaDrawLineStyle := psDashDot;

    LEADScr1.CaptureAreaDrawEllipseHeight := 5;
    LEADScr1.CaptureAreaDrawEllipseWidth := 5;

    {show cursor while drawing}
    LEADScr1.CaptureAreaUseCrossLinesCursor := False;
    LEADScr1.CaptureAreaDrawCursor := crArrow;
    LEADScr1.CaptureAreaShowDrawCursor := True;

    {do the capture}
    LEADScr1.CaptureArea(CAPTURE_AREA_ROUNDRECT);

    {copy the image to a Main Control}
    LEAD1.Bitmap := LEADScr1.Bitmap;