ProgressStatus Example for Delphi

procedure TForm1.LEADDicomDS1ProgressStatus(ASender: TObject;
  nPercent: Smallint);
begin
   Caption:= 'Loading...' + IntToStr(nPercent) + '%';
    if(gbQuit = True)then
        LEADDicomDS1.EnableProgressEvent:= False; //stop the load

   Application.ProcessMessages();
end;