uses Clipbrd;
procedure TForm1.Button1Click(Sender: TObject);
var clipboard: TClipBoard;
begin
clipboard:=TClipBoard.Create;
with (sender as Tbutton)do
clipboard.astext:= (sender as Tbutton).caption;
end;
uses Clipbrd;
procedure TForm1.Button1Click(Sender: TObject);
var clipboard: TClipBoard;
begin
clipboard:=TClipBoard.Create;
with (sender as Tbutton)do
clipboard.astext:= caption;
end;
将所有按钮的ONCLICK事件指向该过程。