[Lazarus] GetFormImage bug

2014-05-13 Thread Chris Crori
Hi guys,
I am not very sure on how I can describe this...

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

Regards,

Chris--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetFormImage bug

2014-05-13 Thread Howard Page-Clark

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@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetFormImage bug

2014-05-13 Thread Chris Crori
Since the problem is in my code I will try to figure it out and report any 
results. The system is a bit complex to post everything, but the basics are the 
same. If I fail in this I will try to duplicate the problem in smaller forms, 
so I can post a bug report

Thanks for testing Howard :)


From: Howard Page-Clark 
Sent: Tuesday, May 13, 2014 7:44 PM
To: lazarus@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@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 --
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus