Hey guys, I have a program, where I want to print the content of a Panel.
I already found a way to save the content of the Panel to a bitmap:
var R: TRect;
Bitmap: TBitmap;
begin
Bitmap := TBitmap.Create;
try
R := Rect(0, 0, Panel1.Width, Panel1.Height);
Bitmap.SetSize(Panel1.Width, Panel1.Height);
Bitmap.Canvas.CopyRect(R, Panel1.Canvas, R);
finally
bitmap.free;
end;
end;
I was searching in the internet for about an hour, but I can't find something that helps me...
I just want to print, what I saved in my variable "Bitmap".