CaptureAreaOptionDlg Example for Delphi 4.0

This is also the example for the CaptureInfoTop, CaptureInfoLeft, CaptureInfoWidth, and CaptureInfoHeight properties.

procedure TForm1.Button3Click(Sender: TObject);
begin
   {set options}
   LEADScr1.CaptureAreaOptionDlg( Self, 0 );
   {do a capture using these options}
   LEADScr1.CaptureArea(LEADScr1.CaptureAreaType);

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

   {display the capture result info}
   Edit1.Text:= IntToStr( Round(LEADScr1.CaptureInfoTop) );
   Edit2.Text:= IntToStr( Round(LEADScr1.CaptureInfoLeft) );
   Edit3.Text:= IntToStr( Round(LEADScr1.CaptureInfoWidth) );
   Edit4.Text:= IntToStr( Round(LEADScr1.CaptureInfoHeight) );

   {reset area options}
   LEADScr1.ResetAreaOptions( );
end;