schreenshot lazarus / 39-Graphics ---------------------------------------------------------------------- hvh · 2016-03-25 21:54 From the Lazarus boek I tried to make a screenshot procedure TForm1.Form1Click(Sender: TObject); var bmp: TBitmap; begin   bmp := TBitmap.Create;   bmp.LoadFromDevice(0);   Image2.Picture.Bitmap.Assign(bmp);   FreeAndNil(bmp); end; Executing this procedure I got an error massage "Cannot  make a raw Image ---------------------------------------------------------------------- Leledumbo · 2016-03-25 22:07 http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Taking_a_s creenshot_of_the_screen ---------------------------------------------------------------------- hvh · 2016-03-26 19:56 Thanks The wiki procedure  works. Its a bit different from The Lazarus Complete Guide. ---------------------------------------------------------------------- Leledumbo · 2016-03-26 21:24 Quote from: hvh on March 26, 2016, 08:56:35 pmThanks The wiki procedure  works. Its a bit different from The Lazarus Complete Guide. The one there might need correction then. LoadFromDevice(0) should never work, the parameter of LoadFromDevice is a device context, GetDC(0) returns device context for the desktop, which is not 0, because 0 is reserved for fail value of the function. ---------------------------------------------------------------------- aradeonas · 2016-05-24 07:40 Or you could use BGRABitmap, it has Screenshot by itself, although it uses this way but you can do more stuff if you want to do graphics.