If you need to use a timer and you do something time consuming (showing a dialog is time consuming) you should always turn the timer off at the start of the timer event and turn it on again at the end (if neccessary)
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
AdvProgressBar1.Position := AdvProgressBar1.Position +1;
if AdvProgressBar1.Position = 100 then begin
showmessage('Yo');
application.Terminate;
end;
Timer1.Enabled := True;
end;