procedure TForm1.Button1Click(Sender: TObject)
var
a: TComponent;
i: INteger;
begin
i := 1;
a := FindComponent('Button' + IntToStr(i));
if (a != nil) and (a is TButton) then
TButton(a).Caption := 'xxx';
end;
var
a: TComponent;
i: INteger;
begin
i := 1;
a := FindComponent('Button' + IntToStr(i));
if (a != nil) and (a is TButton) then
TButton(a).Caption := 'xxx';
end;
if (a <> nil) and (a is TButton) then
TButton(FindComponent('Button1')).caption='xxx'