Hi,
I'm not sure what is wrong with my code, this used to work on Delphi under Xp.
I have tried it under FPC 2.7.1 in Lazarus (CodeTyphon 4.8) Windows 8.1 Pro, and now I always get just black filled rectangles of the correct dimensions (attached).
I am effectively trying to screen capture TWinControls (like TBitBtns). Appreciate any pointers please for code. This is the main portion of my function, var control here is screen.ActiveControl
try
DC := GetDC ( thisForm.handle);
R := Control.boundsRect;
bmp := tBitmap.create;
bmp.width := R.Right-R.Left;
bmp.Height := R.Bottom - R.Top;
Bitblt(bmp.canvas.handle,0,0,bmp.Width,bmp.height,dc,r.left,r.top,SRCCOPY );
bmp.SaveToFile( SavePath + 'check.bmp');
jpegMake := tjpegimage.Create;
jpegMake.Assign(Bmp);
jpegMake.CompressionQuality := 100;
saveName := SavePath + saveName ;
jpegMake.saveToFile ( SAVEnAME);
bmp.free;
jpegMake.Free;
finally
if (dc <> null) then
releasedc(thisForm.handle,dc);
end;