<div dir="ltr">It worked. Thanks!<div><br></div><div>Why is necessary to call the TCanvas.Changed after TForm1.GetFormImage?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-26 17:58 GMT-02:00 Balázs Székely <span dir="ltr"><<a href="mailto:getmem1@gmail.com" target="_blank">getmem1@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<span class=""><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Am I using the method GetFormImage right?</div></blockquote></span><div>Yes,<br></div><span class=""><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Should I fill a bug report for this issue?</div></blockquote></span><div>No.<br><br></div><div>Please try this:<span class=""><br>var<br>  bmp: TBitmap;<br>begin<br>  bmp:=Form1.GetFormImage;<br>  try<br></span>    <b>bmp.Canvas.Changed;</b><span class=""><br>    bmp.SaveToFile(<wbr>ExtractFilePath(Application.<wbr>ExeName)+'form.bmp');<br>  finally<br>    FreeAndNil(bmp);<br>  end;<br>end;      <br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Dec 26, 2016 at 9:38 PM, Fabio Luis Girardi via Lazarus <span dir="ltr"><<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><wbr>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi!<div><br></div><div>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).</div><div><br></div><div>But, using Qt or GTK2, Lazarus 1.6.3 or trunk, I got the same black bitmap. </div><div><br></div><div>So, I created a empty application (just one form with some buttons) and the result is the same.</div><div><br></div><div>The code that should make a screenshot of my form is:</div><div><br></div><div><div>procedure TForm1.Button3Click(Sender: TObject);</div><div>var</div><div>  bmp: TBitmap;</div><div>begin</div><div>  bmp:=Form1.GetFormImage;</div><div>  try</div><div>    bmp.SaveToFile(ExtractFilePath<wbr>(Application.ExeName)+'form.<wbr>bmp');</div><div>  finally</div><div>    FreeAndNil(bmp);</div><div>  end;</div><div>end; </div><div><br></div><div>Am I using the method GetFormImage right?</div><div><br></div><div>If yes, what's the alternative method to make a screenshot of a form?</div><div><br></div><div>Should I fill a bug report for this issue?</div><span class="m_618399023349620062HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_618399023349620062m_89756824814916744gmail_signature">The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/project<wbr>s/pascalscada</a><br><a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>
</font></span></div></div>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
______________________________<wbr>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus-ide.org" target="_blank">Lazarus@lists.lazarus-ide.org</a><br>
<a href="http://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">http://lists.lazarus-ide.org/l<wbr>istinfo/lazarus</a><br>
<br></font></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br><a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>
</div>