//每次好像只能有一个线程运行。
procedure ClearThread.Execute;
var
i:integer;
begin
for i := 0 to high(imgList) do
begin
frmMain.lblInfo.Caption:='请稍后,正在清除第' +intToStr(frmMain.mainProgressBar.Position+1) +
'张图像。';
if not DeleteFile(PChar(imgList[i])) then flasenum:= flasenum+1; //如果删除失败
frmMain.mainProgressBar.Position:=frmMain.mainProgressBar.Position+1 ;
end;
//delEnd:=true;
end;
procedure ClearThread.Execute;
var
i:integer;
begin
for i := 0 to high(imgList) do
begin
frmMain.lblInfo.Caption:='请稍后,正在清除第' +intToStr(frmMain.mainProgressBar.Position+1) +
'张图像。';
if not DeleteFile(PChar(imgList[i])) then flasenum:= flasenum+1; //如果删除失败
frmMain.mainProgressBar.Position:=frmMain.mainProgressBar.Position+1 ;
end;
//delEnd:=true;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货