Re: Saving Clipboard image to file in code

Posted by Will on August 25, 2007

In Reply to Saving Clipboard image to file in code posted by Koos on August 15, 2007

: I have managed to copy a Form which was set up as a custom report with GetFormImage to clipboard.It shows the complete image of the form when pasted on wordpad.
: How can I save this image on the clipboard as a file on the harddrive from code?

The Clipboard can not be saved directly to a file. Solution: put the Clipboard contents in a Delphi TPicture and next save the TPicture in a file, it will be written in bitmap format.

if Clipboard.HasFormat(CF_BITMAP) then begin
  Image1.Picture.Assign(Clipboard);
  Image1.Picture.SaveToFile('c:\test\abc.bmp');
end;


Related articles

       

Follow Ups