Il 27/12/2016 17:49, Juha Manninen via Lazarus ha scritto:
Somebody with good knowledge of the graphics code should fix it. I
remember I tried over 2 years ago but failed.
Just adding a line to GetFormImage does the trick:
function TForm1.GetFormImage: TBitmap;
var
ARect: TRect;
begin
Result := TBitmap.Create;
try
Result.Width := ClientWidth;
Result.Height := ClientHeight;
LCLIntf.GetWindowRect(Handle, ARect);
with GetClientOrigin do
PaintTo(Result.Canvas, ARect.Left - X, ARect.Top - Y);
except
Result.Free;
raise;
end;
Result.Canvas.Changed; <--- This line added
end;
Giuliano
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus