RAD Studio
ContentsIndex
PreviousUpNext
Copying Graphics to the Clipboard

You can copy any picture, including the contents of image controls, to the clipboard. Once on the clipboard, the picture is available to all applications. 

To copy a picture to the clipboard, assign the picture to the clipboard object using the Assign method. 

This code shows how to copy the picture from an image control named Image to the clipboard in response to a click on an EditCopy menu item:

procedure TForm1.Copy1Click(Sender: TObject);
begin
  Clipboard.Assign(Image.Picture)
end.

 

void __fastcall TForm1::Copy1Click(TObject *Sender)
{
  Clipboard()->Assign(Image->Picture);
}
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!