频道分类

Delphi VCLUnZip组件解压缩文件用法

作者:admin 来源: 日期:2020/2/8 14:08:48 人气: 标签:

 
procedure TForm1.Button1Click(Sender: TObject);
begin
VCLUnZip1.ZipName:=ExtractFilePath(ParamStr(0))+'abc.zip';
VCLUnZip1.ReadZip;
VCLUnZip1.DestDir:=ExtractFilePath(ParamStr(0));
VCLUnZip1.RecreateDirs:=True;//是否创建子目录
VCLUnZip1.DoAll := True;
VCLUnZip1.OverwriteMode := Always;
VCLUnZip1.Password := '';
VCLUnZip1.UnZip;
end;

procedure TForm1.VCLUnZip1TotalPercentDone(Sender: TObject; Percent: Integer);
begin
ProgressBar1.Position:=Percent;
end;