Hope someone can help here.
5+ years ago I was playing around with panel canvas, ie copying a panel canvas as a bitmap; that could then be used in another document format.
As many image permutations and resolutions were being done, I thought I had created the panel way off the forms boundary ( out of users view).
Unfortunately I cannot find the code I used back then, but my memory tells me that I just copied the tpanel canvas to a bitmap; when I try this the area of the panel that is off the visible screen is blank.
If I move the panel into the visible area, then the visible part becomes part of the tbitmap.
Has something changed, or is there another way to grab the contents of a tpanel that is outside the screen bounds?
var bmp:tbitmap;
begin
bmp:=tbitmap.Create;
bmp.Width:=panel1.Width;
bmp.Height:=panel1.Height;
panel1.Left:=-panel1.Width+trackbar1.Position;
bmp.Canvas.CopyRect(rect(0,0,panel1.Width,panel1.Height),panel1.Canvas,rect(0,0,panel1.Width,panel1.Height));
image1.Picture.Bitmap:=bmp; // temp dump bmp to timage.
bmp.Free;
end;
Trackbar used to bring panel in/out of focus of screen, image1 is a timage that I drop the copied bmp onto to see what is happening.