Class TCapture (unit capture)

Inherits from

TImage

Constructors


constructor Create(AOwner: TComponent);

Initialize some values


Functions

procedure Capture;

Routine to capture the entire screen

destructor Destroy;


procedure SaveSelectionToFile(const FileName: string);

Routine to save the selection

procedure SaveToFile(const FileName: string);

Does what it says

procedure Loaded;

Width/Height must be the same as screendimensions

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: integer);

Select startingpoint of selection and of selection-rectangle

procedure MouseMove(Shift: TShiftState; X, Y: Integer);

Draw selection-rectangle while moving the mouse when selecting

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: integer);

Set selection endingpoint and remove selection-rectangle

procedure DrawMarquee(mStart, mStop: TPoint; AMode: TPenMode);

Routine to draw selection-rectangle

procedure VerifyRect;

If someone make a selection starting right/bottom and ending left/top swap value's

Properties

property Align : TAlign


property AutoSize : boolean

Hide this property, else it won't work

property Center : boolean

idem

property HideMyself : boolean


property Stretch : boolean

idem

Events

Variables

DeskTopCanvas : TCanvas;


DeskTopDC : HDc;


DeskTopRect : TRect;


ptMove : TPoint;


ptOrigin : TPoint;


Selecting : boolean;


SelectionBitmap : TBitmap;


SelectionRect : TRect;


FAlign : TAlign;


FAutoSize : boolean;


FCenter : boolean;


FHideMyself : boolean;


FStretch : boolean;



Constructors


constructor Create(AOwner: TComponent);

Initialize some values


Functions


procedure Capture;

Routine to capture the entire screen


destructor Destroy;


procedure SaveSelectionToFile(const FileName: string);

Routine to save the selection


procedure SaveToFile(const FileName: string);

Does what it says


procedure Loaded;

Width/Height must be the same as screendimensions


procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: integer);

Select startingpoint of selection and of selection-rectangle


procedure MouseMove(Shift: TShiftState; X, Y: Integer);

Draw selection-rectangle while moving the mouse when selecting


procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: integer);

Set selection endingpoint and remove selection-rectangle


procedure DrawMarquee(mStart, mStop: TPoint; AMode: TPenMode);

Routine to draw selection-rectangle


procedure VerifyRect;

If someone make a selection starting right/bottom and ending left/top swap value's


Properties


property Align : TAlign


property AutoSize : boolean

Hide this property, else it won't work


property Center : boolean

idem


property HideMyself : boolean


property Stretch : boolean

idem


Events


Variables


DeskTopCanvas : TCanvas;


DeskTopDC : HDc;


DeskTopRect : TRect;


ptMove : TPoint;


ptOrigin : TPoint;


Selecting : boolean;


SelectionBitmap : TBitmap;


SelectionRect : TRect;


FAlign : TAlign;


FAutoSize : boolean;


FCenter : boolean;


FHideMyself : boolean;


FStretch : boolean;