Ola,

I'm downloading 5 files async. The downloaded files are replacing important files which are needed to load my app. and the executable itself. The problem is that I don't know when the last file is downloaded.
vb.net Code:
  1. wclient1.DownloadFileAsync(New Uri(webFolder & fName1), Application.StartupPath & "\" & fName1)
  2. wclient2.DownloadFileAsync(New Uri(webFolder & fName2), Application.StartupPath & "\" & fName2)
  3. wclient3.DownloadFileAsync(New Uri(webFolder & fName3), Application.StartupPath & "\" & fName3)
  4. wclient4.DownloadFileAsync(New Uri(webFolder & fName4), Application.StartupPath & "\" & fName4)
  5. wclient5.DownloadFileAsync(New Uri(webFolder & fName5), Application.StartupPath & "\" & fName5)
  6.  
  7. Private Sub wClient1_DownloadProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) Handles wclient1.DownloadProgressChanged
  8.     Dim bytesIn As Double = Double.Parse(e.BytesReceived.ToString())
  9.     Dim totalBytes As Double = Double.Parse(e.TotalBytesToReceive.ToString())
  10.     Dim percentage As Double = bytesIn / totalBytes * 100
  11. download_progress.Value = Int32.Parse(Math.Truncate(percentage).ToString())
  12.     wclient1.Dispose()
  13. End Sub
  14.  
  15. Private Sub wClient2_.....
  16. '...etc

What I did was
vb.net Code:
  1. Private Sub wclient5_DownloadFileCompleted(sender As Object, e As System.ComponentModel.AsyncCompletedEventArgs) Handles wclient5.DownloadFileCompleted
  2.     System.Diagnostics.Process.Start(Application.StartupPath & "\my.exe")
  3.     wclient5.Dispose()
  4.     Application.Exit()
  5. End Sub
...which is wrong, 'cause I don't know which file is downloaded last.

Anyone knows how to solve this? Thanks in advance.