Mirror

How to store the content of the clipboard in a file (Views: 100)


Problem/Question/Abstract:

How to store the content of the clipboard in a file

Answer:

{ ... }
if Clipboard.HasFormat(CF_BITMAP) then
begin
  bmp := TBitmap.Create;
  try
    Clipboard.AssignTo(bmp);
    bmp.SaveToFile(filename);
  finally
    bmp.free
  end;
end;
{ ... }

<< Back to main page