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);

posted on 2023-12-20 20:18  禁卫军  阅读(56)  评论(0编辑  收藏  举报