Ответ : 1
Среда : Lazarus
Операционная система : Windows, Linux
Зависимости : -
Источник : http://freepascal.ru/forum/viewtopic.php?f=5&t=3784
Теги : экран, рабочий стол, скриншот, screenshot
- Код: Выделить всё
- uses ..., LCLIntf, LCLType;
 ...
 procedure TForm1.Button1Click(Sender: TObject);
 var
 MyBitmap : TBitmap;
 ScreenDC : HDC;
 begin
 MyBitmap:=TBitmap.Create;
 ScreenDC:=GetDC(0);
 MyBitmap.LoadFromDevice(ScreenDC);
 Image.Picture.Bitmap:=MyBitmap;
 MyBitmap.Free;
 end;



