procedure Status(sForm: Tform; bHab: boolean);
var
iA : integer;
AComponent: TComponent;
begin
for iA := 0 to sForm.ComponentCount – 1 do
begin
if sForm.Components[iA] is TsButton then
begin
AComponent := sForm.FindComponent(sForm.Components[iA].Name);
if Assigned(AComponent) then
if AComponent is TControl then
TControl(AComponent).Enabled := bHab;
end;
end;
end;