[Lazarus] TForm.GetFormImage is broken?

Fabio Luis Girardi fluisgirardi at gmail.com
Mon Dec 26 20:38:13 CET 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161226/1397a430/attachment.html>


More information about the Lazarus mailing list