Procedure Make_Shoot(aForm : TForm; aBmp : TBitmap);
Var aDc : HDC;
Begin
If (aForm = Nil) or (aBmp = Nil) Then Exit;
With aBmp do
Begin
Height := aForm.Height;
Width := aForm.Width;
aDC := GetWindowDC(aForm.Handle);
BitBlt(Canvas.Handle, 0, 0, Width, Height, aDC,
0, 0, srcCopy);
ReleaseDC(aForm.Handle, aDC);
End;
End;
// Utilisation
procedure TfrmMain.btn_ShootClick(Sender: TObject);
Var Bmp : TBitmap;
begin
Bmp := TBitmap.Create;
Make_Shoot(Self, Bmp);
// ... ici votre code pour enregistrer où afficher l'image ...
Bmp.Free;
end;