This sample shows how to implement progress indication in ZipForge.
Download ZipForge | Learn More | All Delphi samples
unit MainFrm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ZipForge;
type
TMainForm = class(TForm)
Archiver: TZipForge;
pbProgress: TProgressBar;
btnExtract: TButton;
lblFile: TLabel;
procedure ArchiverOverallProgress(Sender: TObject; Progress: Double;
Operation: TZFProcessOperation; ProgressPhase: TZFProgressPhase;
var Cancel: Boolean);
procedure ArchiverFileProgress(Sender: TObject; FileName: WideString;
Progress: Double; Operation: TZFProcessOperation;
ProgressPhase: TZFProgressPhase; var Cancel: Boolean);
procedure btnExtractClick(Sender: TObject);
private
public
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.ArchiverOverallProgress(Sender: TObject;
Progress: Double; Operation: TZFProcessOperation;
ProgressPhase: TZFProgressPhase; var Cancel: Boolean);
begin
pbProgress.Position := Trunc(Progress);
Application.ProcessMessages;
end;
procedure TMainForm.ArchiverFileProgress(Sender: TObject;
FileName: WideString; Progress: Double; Operation: TZFProcessOperation;
ProgressPhase: TZFProgressPhase; var Cancel: Boolean);
begin
lblFile.Caption := 'Extracting: ' + FileName;
Application.ProcessMessages;
end;
procedure TMainForm.btnExtractClick(Sender: TObject);
begin
Archiver.FileName := 'c:\test.zip';
Archiver.OpenArchive;
Archiver.BaseDir := 'c:\temp';
Archiver.ExtractFiles('*.*');
Archiver.CloseArchive;
end;
end.
Download ZipForge | Learn More | All Delphi samples
|
|
|
Current version: 6.95
Released: January 21, 2019
Price: $ 69
|
|
Component Ace is all that it advertises. It is easy to implement and is very fast.
In addition, the customer support is the best I have ever had. All my questions were answered within hours, often immediately. The responses also answered my questions, no need for followup emails.
If your application needs the functionality that Component Ace provides, search no further.
Linda Murphy
|
|
|