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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|