Как сделать скриншот экрана — Delphi(Делфи)

procedure TForm1.Button1Click(Sender: TObject);
var bmp:TBitmap;
begin
    bmp := TBitmap.Create;
    bmp.Width := Screen.Width;
    bmp.Height := Screen.Height;
    BitBlt(bmp.Canvas.Handle, 0,0, Screen.Width, Screen.Height,
           GetDC(0), 0,0,SRCCOPY);
 
    Image1.Width := Screen.Width;
    Image1.Height := Screen.Height;
    Image1.Picture.Assign(bmp);
    bmp.Free;
end;

Leave a Comment

28 + = 29