Code procedure ScreenShot(PathToSave: string); begin with TBitmap.Create do begin Width := Screen.Width; // указываем размеры Height := Screen.Height;
BitBlt(Canvas.Handle, 0, 0, Width, Height, GetDC(GetDesktopWindow), 0, 0, SRCCOPY);
SaveToFile(PathToSave); // сохраняем на диск Free; // освобождаем end; end; использование: Code procedure TForm1.Button1Click(Sender: TObject); begin ScreenShot('C:\ScreenShot.bmp'); end;
|