Aquí tienes otro ejemplo:
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
Var
nConta:Integer;
begin
for nConta:=0 to form1.ComponentCount -1 do
begin
if form1.Components[nConta] is TShape then
begin
(Components[nConta] as TShape).brush.Color:=ClGreen;
end
end;
end;
Un Saludo.