如何使用vb.net在列表框中下载多个文件
我想下载倍数文件和列表框中的下载链接,是否有任何方法可以使用webclient进行此操作,我看到人们通过文件逐文件做到这一点,看起来很困难,我想显示当前下载速度,当前文件大小和总过程的进度
I want to download multiples files and the download links in list box, Is there any way to do that using WebClient, i saw people do that by download file by file by it look difficult way and i want to show current downloading speed ,current file size and progress of total process
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我以这种方式解决了这个建议:
感谢@fawlty
I solved this proplem by that way:
thanks for @Fawlty
这是我写的一些代码,以演示如何做到这一点。我创建了一个
filedownloader
类,因为下载完成后,您可以获取源URL和目标文件名。我还添加了一个进度活动。仅使用webclient
类的问题是,您将失去在事件中正在处理哪个文件的跟踪。Here is some code I wrote to demonstrate how you could do this. I created a
FileDownloader
class as this will allow you to get the source url and destination filename when the download completes. I have also added an event for progress. The problem with just using theWebClient
class on its own is that you lose track of which file is being processed in the events.