Declaration
property OnProgress: TIEProgressEvent;
Description
Occurs during input/output operations. It is commonly used to show task progress.
You can use
ProgressTask to determine what action is underway.
Note:
◼If you use this to update a progress bar then you can reset it in the
OnFinishWork event.
◼To access I/O progress for the
IO class of a TImageEnView, use the
OnProgress event.
procedure TForm1.ImageEnIO1Progress(Sender: TObject; per: Integer);
begin
// Show load/save progress
ProgressBar1.Visible := True;
ProgressBar1.Position := per;
Application.ProcessMessages(); // Important!
end;
procedure TForm1.ImageEnIO1FinishWork(Sender: TObject);
begin
// Hide the progress bar
ProgressBar1.Visible := False;
end;
// Showing detailed progress display
procedure TMainForm.ImageEnIO1Progress(Sender: TObject; per: Integer);
begin
case ImageEnIO1.ProgressTask of
ietLoading : Caption := format( 'Loading - %d%%', [per] );
ietSaving : Caption := format( 'Saving - %d%%', [per] );
ietOtherIO : Caption := format( 'Writing - %d%%', [per] );
ietAcquisition : Caption := format( 'Acquiring - %d%%', [per] );
else Caption := format( 'Processing - %d%%', [per] ); // Should not occur
end;
end;