RAD Studio |  |

Copying Graphics to the Clipboard
See Also
Collapse All

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:

Copy Code

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

Copy Code

    void __fastcall TForm1::Copy1Click(TObject *Sender)
    {
      Clipboard()->Assign(Image->Picture);
    }

See Also

Cutting Graphics to the Clipboard

Pasting Graphics from the Clipboard

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!