procedure MyForm.DisableAllButtons;
var
i : integer;
begin
try
for i := 0 to ComponentCount - 1 do
begin
if Components[i] is TButton then //Check whether the component is button or anything else
begin
MyForm(Components[i]).Enabled := False;
end;
end;
except
on E : Exception do
begin
ShowMessage('Error occured in function DisableAllButtons: ' + E.Message);
exit;
end;
end;
end;
for i := 0 to frmMain.ComponentCount -1 do
if ( frmMain.Components[i] is TAdvSmoothLabel ) then
if TAdvSmoothLabel(frmMain.Components[i]).Name = 'projNameLabel' then
TAdvSmoothLabel(frmMain.Components[i]).Caption.Text := appVar.appName;