1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
procedure TForm1.Button1Click(Sender: TObject);
var
MonBMP : TBitmap;
Horaire : TDateTime;
begin
Capture1.Copy;
Horaire := Now;
MonBMP := TBitmap.Create;
try
if Clipboard.HasFormat(cf_BITMAP) then
begin
MonBMP.Assign(Clipboard);
MonBMP.SaveToFile(ExtractFilePath(Application.ExeName) + FormatDateTime('yyyy-mm-dd hh-nn-ss',Horaire) + '.bmp');
end;
finally
MonBMP.Free;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Capture1.Connect;
Capture1.SetVideo(true);
end; |
Partager