function TForm1.ComponentCnt(c: TClass): integer;
var
i: integer;
begin
Result := 0;
for i := 0 to ComponentCount - 1 do
begin
if (Components[i] is c) then
inc(Result);
end;
Caption := inttostr(Result);
end;
function TForm1.ComponentCnt(c: TClass): integer;
var
i: integer;
begin
Result := 0;
for i := 0 to ComponentCount - 1 do
begin
if (Components[i] is c) then
inc(Result);
end;
Caption := inttostr(Result);
end;