你可以自己编程来实现删除文件夹,而不用利用WINDOWS的删除功能!<br>这样你就可以除掉进度条了。<br><br>uses ShellAPI;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> FileOpStruct :TSHFileOpStruct;<br> Buf1 :array [0..127] of Char;<br> Buf2 :array [0..127] of Char;<br> Str1,Str2 :String;<br>begin<br> Str1 :='c:/tyn1';<br> Str2 :='c:/tyn2';<br> FillChar(Buf1,SizeOf(Buf1),0);<br> FillChar(Buf2,SizeOf(Buf2),0);<br> StrPCopy(Buf1,Str1);<br> StrPCopy(Buf2,Str2);<br> with FileOpStruct do<br> begin<br> Wnd :=Handle;<br> case (Sender as TButton).tag of<br> 1 : wFunc :=FO_COPY;<br> 2 : wFunc :=FO_DELETE;<br> 3 : wFunc :=FO_Move;<br> 4 : wFunc :=FO_RENAME;<br> end;<br> pFrom :=@Buf1;<br> pTo :=@Buf2;<br> fFlags :=FOF_SIMPLEPROGRESS; //去掉这条语句就可以不显示进度条<br> fAnyOperationsAborted :=False;<br> hNameMappings :=nil;<br> case (Sender as TButton).tag of<br> 1 : lpszProgressTitle :='拷贝文件';<br> 2 : lpszProgressTitle :='删除文件';<br> 3 : lpszProgressTitle :='移动文件';<br> 4 : lpszProgressTitle :='文件重命名';<br> end;<br> end;<br> SHFileOperation(FileOpStruct);<br>end;<br><br>