[Lazarus] TForm.GetFormImage is broken?
Balázs Székely
getmem1 at gmail.com
Mon Dec 26 20:58:18 CET 2016
Hi,
Am I using the method GetFormImage right?
>
Yes,
Should I fill a bug report for this issue?
>
No.
Please try this:
var
bmp: TBitmap;
begin
bmp:=Form1.GetFormImage;
try
*bmp.Canvas.Changed;*
bmp.SaveToFile(ExtractFilePath(Application.ExeName)+'form.bmp');
finally
FreeAndNil(bmp);
end;
end;
On Mon, Dec 26, 2016 at 9:38 PM, Fabio Luis Girardi via Lazarus <
lazarus at lists.lazarus-ide.org> wrote:
> Hi!
>
> Currently I'm trying to use TForm.GetFormImage method to make a minimap
> (something similar to Sublime Text editor) of a big form (the parent of
> this big form is a TScrollbox on this application).
>
> But, using Qt or GTK2, Lazarus 1.6.3 or trunk, I got the same black
> bitmap.
>
> So, I created a empty application (just one form with some buttons) and
> the result is the same.
>
> The code that should make a screenshot of my form is:
>
> procedure TForm1.Button3Click(Sender: TObject);
> var
> bmp: TBitmap;
> begin
> bmp:=Form1.GetFormImage;
> try
> bmp.SaveToFile(ExtractFilePath(Application.ExeName)+'form.bmp');
> finally
> FreeAndNil(bmp);
> end;
> end;
>
> Am I using the method GetFormImage right?
>
> If yes, what's the alternative method to make a screenshot of a form?
>
> Should I fill a bug report for this issue?
>
> --
> The best regards,
>
> Fabio Luis Girardi
> PascalSCADA Project
> http://sourceforge.net/projects/pascalscada
> http://www.pascalscada.com
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus-ide.org
> http://lists.lazarus-ide.org/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161226/9083fb94/attachment.html>
More information about the Lazarus
mailing list