ClipboardAssign (C++)
Description
The following line copies the bitmap of a speed button named SpeedButton1 to the clipboard and then copies the clipboard to the image picture. Note that you must add Clipbrd to the uses clause.
Code
#include <Clipbrd.hpp>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Clipboard()->Assign(SpeedButton1->Glyph);
Image1->Stretch = True;
Image1->Picture->Assign(Clipboard());
}
Uses
- Vcl.Clipbrd.TClipboard.Assign ( fr | de | ja )
- Vcl.Buttons.TSpeedButton.Glyph ( fr | de | ja )