1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
const LBuf=$1000;
var
i,lu:integer;
buf:array[1..LBuf] of byte;
begin
i:=Total_Ligne;
ProgressBar_Traitement.Max:=i div lbuf;
ProgressBar_Traitement.min := 0;
Label_Info.caption:='Traitement en cours...';
if not fillexiste(monfichier1) then
begin
showmessage('Fichier n''existe pas');
exit;
end;
assignfile(f_in,'monfcihier1');
reset(f_in,1);
assignfile(f_out,'monfichier2');
rewrite(f_out,1);
i:=0;
repeat
BlockRead(f_In,buf,lbuf,lu);
BlockWrite(f_out,buf,lu,lu);
inc(i);
ProgressBar_Traitement.position:=i;
until lu<lbuf; |
Partager