我做了一些谷歌搜索但找不到我要找的东西。我同时启动多个异步下载,我想检查下载的文件。我怎样才能做到这一点?
Private Sub client_DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
MsgBox("Download Completed!") ' I want to add the name of the downloaded file in this message
End Sub
提前致谢! 此致
答案 0 :(得分:0)
在AsyncCompletedEventArgs中有一个属性UserState。这样,您可以访问在启动异步任务时设置的数据。只需填写UserState中的路径并使用它。 要设置用户数据值,您可以使用此DownloadFileAsync的重载。