ClipboardAssign (Delphi)

From RAD Studio Code Examples
Revision as of 20:06, 3 November 2011 by L10nBot (talk | contribs) (normalized vcl links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

uses Clipbrd;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Clipboard.Assign(SpeedButton1.Glyph);
  Image1.Stretch := True;
  Image1.Picture.Assign(Clipboard);
end;

Uses