TAniIndicator does not spin [duplicate]

  

This question already has an answer here:

Correctly using TAniIndicator in firemonkey mobile dev for wait for processing

2 answers

I have the following code which I have put together hoping that it will display a AniIndicator which spins round, however it does not and I do not know why. I haven’t used this component before so any help would be much appreciated.

procedure TForm1.Button1Click(Sender : TObject);
begin
EnableIndicator;
_LoadThread := TLoadThread.Create;
_LoadThread.OnTerminate := ThreadTerminated;
_LoadThread.Start;
Application.ProcessMessages;
end;

procedure TForm1.EnableIndicator;
begin
AniIndicator1.Visible := True;
AniIndicator1.Enabled := True;
Application.ProcessMessages;
end;

procedure TForm1.ThreadTerminated(Sender:TObject);
begin
AniIndicator1.Visible := False;
AniIndicator1.Enabled := False;
end;

Comments are closed.