function GetCtrls(MyForm: TForm): TStringList; var i: Integer; begin Result:=TStringList.Create; for i:=0 to MyForm.ComponentCount-1 do Result.Add(MyForm.Components[i].Name); end;
procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.AddStrings(GetCtrls( Self)) ; end;
var i: Integer;
begin
Result:=TStringList.Create;
for i:=0 to MyForm.ComponentCount-1 do
Result.Add(MyForm.Components[i].Name);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Lines.AddStrings(GetCtrls( Self)) ;
end;