I use this code to save a screenshot of a Form to a bitmap file:
var
Bmp : Graphics.TBitmap;
begin
Bmp := GetFormImage;
try
Bmp.SaveToFile( _DestFilePath );
finally
Bmp.Free;
end;
end;
However, it doesn't seem to work well when a TRichEdit
control is placed on the Form. Instead of a TRichEdit control and all its content, a white rectangle is saved into the final image.
How can I get a complete screenshot of a Form that contains a non-blank TRichEdit
control?
I use Delphi 2009.