unit ClipboardAssign;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    SpeedButton1: TSpeedButton;
    Image1: TImage;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: ClipboardAssign
// Method: Clipbrd.TClipboard.Assign
// Property: Buttons.TSpeedButton.Glyph

// BeginCode
{
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.
}
uses Clipbrd;

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