Author: Maarten de Haan How to copy a bitmap, picture or metafile from the clipboard? Answer: 1 var 2 bmp: TBitmap; 3 pic: TPicture; 4 5 begin 6 bmp := TBitmap.Create; 7 8 // PICTURE OR METAFILE 9 if (ClipBoard.HasFormat(CF_PICTURE)) or 10 (ClipBoard.HasFormat(CF_METAFILEPICT)) then 11 begin 12 pic := TPicture.Create; 13 pic.Assign(ClipBoard); 14 X := pic.Width; 15 Y := pic.Height; 16 bmp.Width := X; 17 bmp.Height := Y; 18 bmp.Canvas.Draw(0, 0, pic.Graphic); 19 pic.Free; 20 end; 21 22 // BITMAP 23 if (ClipBoard.HasFormat(CF_BITMAP)) then 24 begin 25 bmp.Assign(ClipBoard); 26 end; 27 // Bitmap, picture or metafile is now in bmp 28 // When used free bmp! 29 end;