CnPack Forum

#1 CnMD5的进度回调函数怎么使用?
[code]
var
FAbort: Boolean;

procedure TForm1.FormCreate(Sender: TObject);
begin
FAbort := False;
end;

procedure TForm1.btn1Click(Sender: TObject);
begin
if dlgOpen1.Execute then
edt1.Text := MD5Print(MD5File(dlgOpen1.FileName, MD5CalcPrgssProc)));
end;

procedure TForm1.MD5CalcPrgssProc(ATotal, AProgress: Int64;
var Cancel: Boolean);
begin
pb1.Position := Round(AProgress / ATotal * 100);
Cancel := FAbort;
end;[/code]

这里实现了MD5的进度回调函 ..

#1 >>Next Page

Forum:CnVCL 组件包
Thread:CnMD5的进度回调函数 ...
Next Thread:CnHashLangFileStorag ...

Home
Login

Powered by Discuz!