[Lazarus] GetFormImage bug
Chris Crori
crori49 at yahoo.com
Wed May 14 17:42:51 CEST 2014
In this project, speedbuttons and bitbuttons work fine, but TDBGrid does not show.
If it is visible in your computer, maybe there is something that can go wrong with display drivers?
Press the right button to create the form and left (button1) to refresh the Preview
From: Howard Page-Clark
Sent: Tuesday, May 13, 2014 7:44 PM
To: lazarus at lists.lazarus.freepascal.org
Subject: Re: [Lazarus] GetFormImage bug
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).
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140514/221ac261/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPrj.zip
Type: application/x-zip-compressed
Size: 131705 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140514/221ac261/attachment-0003.bin>
More information about the Lazarus
mailing list