Stretchwickster
Programmer
The following code should in theory draw the clipBitmap on APrintCanvas but doesn't. I have checked that clipBitmap does actually contain the right image. However, I think the problem might be that I'm passing the canvas of an image from another form (form2), into a method (belonging to form1) as APrintCanvas. Anyone got any ideas on how to sort this out?
Clive
Code:
clipBitmap := TBitmap.Create;
try
memoryChart1.CopyToClipboardBitmap;
if Clipboard.HasFormat(CF_BITMAP) then
begin
clipBitmap.LoadFromClipboardFormat(CF_BITMAP, Clipboard.GetAsHandle(CF_BITMAP), 0);
APrintCanvas.Draw(0, 0, clipBitmap);
end;
finally
clipBitmap.Free;
end;