1、在线程中改UI
TThread.Synchronize(Nil,procedure
begin
Form1.Label12.Caption:='共'+IntToStr(zs)+'张图片,正在处理第'+IntToStr(i)+'张';
end);
2、在子程中改UI
Application.QueueAsyncCall(procedure(Data: PtrInt)
var
inputst:String;
begin
Form1.Label12.Caption:='共'+IntToStr(zs)+'张图片,正在处理第'+IntToStr(i)+'张';
end, 0);