用Delphi实现整个网站图片的极速下载(3) else SubJ:='0'+inttostr(j); CurUrl:=Url+SubI+'/images/'; DestPath:=girlPic+SubI+'\'; if not DirectoryExists(DestPath) then ForceDirectories(DestPath); //使用线程,速度能提高N倍以上 if CheckBox1.Checked then begin GetMMThread(CurUrl,DestPath,SubJ); sleep(500); end else //不使用线程 begin try strm.Clear; IdHTTP1.Get(CurUrl+SubJ+'.jpg',strm); strm.SaveToFile(DestPath+SubJ+'.jpg'); Memo1.Lines.Add(CurUrl+' Download OK !'); strm.Clear; IdHTTP1.Get(CurUrl+'tn_'+SubJ+'.jpg',strm); strm.SaveToFile(DestPath+'tn_'+SubJ+'.jpg'); Memo1.Lines.Add(CurUrl+' Download OK !'); except Memo1.Lines.Add(CurUrl+' Download Error !'); end;