[Lazarus] GetFormImage bug
Howard Page-Clark
hdpc at talktalk.net
Tue May 13 18:44:25 CEST 2014
On 13/05/2014 16:49, Chris Crori wrote:
> I have a thumbnail section in my main program form. In the forms, I use
> GetFormImage to make an image and send it to the mainform.
> The bug is that some components are not visible in this image.
> TDBGrid is one and a custom component derived from TBitBtn is another.
> I use the latest stable Lazarus 1.2.2 with FPC 2.6.4 on windows7, both
> 32 and 64 bit
This method
//---------
procedure TForm1.Button1Click(Sender: TObject);
var
bmp: TBitmap;
begin
form2.Show;
bmp:=form2.GetFormImage;
try
Image1.Canvas.StretchDraw(Image1.ClientRect, bmp);
finally
bmp.Free;
end;
end;
//---------
shows a DBGrid (and everything else I dropped on form2) nicely on my
Win7 32bit setup.
Perhaps you need to share the code that drops parts of the bitmap (and
perhaps the lfm of the imaged form as well).
More information about the Lazarus
mailing list