The form has a method GetFormImage which renders the form into a TBitmap. If you need a jpeg you must convert the bitmap to jpeg before copying to the clipboard:
uses
clipbrd;
var
CF_JPEG: Integer = -1;
procedure TForm1.Button1Click(Sender: TObject);
var
bmp: TBitmap;
jpeg: TJpegImage;
begin
bmp := GetFormImage;
try
jpeg := TJpegImage.Create;
try
jpeg.Assign(bmp);
if CF_JPEG = -1 then
CF_JPEG := RegisterClipboardFormat('image/jpeg');
jpeg.SaveToClipboardFormat(CF_JPEG);
finally
jpeg.Free;
end;
finally
bmp.Free;
end;
end;
I tested this on Win 10, Laz 2.0.10/FPC 3.2.0 / 64 bit, and it works (there was an error initially because I had forgotten to add "clipbrd" to "uses").
GetFormImage renders the form WITHOUT the non-client areas such as title bar and border. I don't know how this can be handled (except for taking a screenshot of the entire screen and cropping to form size). If everything breaks you can still press ALT+PRINT which copies the current form to the clipboard, but as a TBitmap only.