我做实验了,是不行
if self.ProgressBar1.Position=100 then self.ProgressBar1.Visible:=false;
这样写就可以了