
My.Computer.Network.DownloadFile(URL, Package)
Imports System.Net
Private WithEvents wClient As New WebClient()
Private Sub wClient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wClient.DownloadProgressChanged
If Me.ProgressBar1.Maximum <> e.TotalBytesToReceive Then
Me.ProgressBar1.Maximum = e.TotalBytesToReceive
End If
Me.ProgressBar1.Value = e.BytesReceived
End Sub
Private Sub wClient_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wClient.DownloadFileCompleted
MessageBox.Show("File has finished downloading!", "Success: File Complete", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.ProgressBar1.Value = 0 'reset the progressbar
End Sub
wClient.DownloadFile(New Uri("http://example.com/somefile.zip"), "C:\savehere\somefile.zip")
Control.CheckForIllegalCrossThreadCalls = False
wClient.DownloadFileAsync(New Uri("http://example.com/somefile.zip"), "C:\savehere\somefile.zip")

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim URL As String = "http://assets.minecraft.net/" + TextBox1.Text + "/minecraft.jar"
Dim Package As String = "C:\Users\" + SystemInformation.UserName + "\AppData\Roaming\.minecraft\bin\" + TextBox1.Text + ".jar"
wClient.DownloadFile(New Uri(URL), Package)
End Sub
Private WithEvents wClient As New WebClient()
Private Sub wClient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wClient.DownloadProgressChanged
If Me.ProgressBar1.Maximum <> e.TotalBytesToReceive Then
Me.ProgressBar1.Maximum = e.TotalBytesToReceive
End If
Me.ProgressBar1.Value = e.BytesReceived
End Sub
Private Sub wClient_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wClient.DownloadFileCompleted
MessageBox.Show("File has finished downloading!", "Success: File Complete", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.ProgressBar1.Value = 0 'reset the progressbar
End Sub
Imports System.Net
'any other Imports System.* go here
Public Partial Class Form1
Private WithEvents wClient As New WebClient()
Private Sub wClient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wClient.DownloadProgressChanged
If Me.ProgressBar1.Maximum <> e.TotalBytesToReceive Then
Me.ProgressBar1.Maximum = e.TotalBytesToReceive
End If
Me.ProgressBar1.Value = e.BytesReceived
End Sub
Private Sub wClient_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wClient.DownloadFileCompleted
MessageBox.Show("File has finished downloading!", "Success: File Complete", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.ProgressBar1.Value = 0 'reset the progressbar
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim URL As String = "http://assets.minecraft.net/" + TextBox1.Text + "/minecraft.jar"
Dim Package As String = "C:\Users\" + SystemInformation.UserName + "\AppData\Roaming\.minecraft\bin\" + TextBox1.Text + ".jar"
wClient.DownloadFileAsync(New Uri(URL), Package)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False
End Sub
'any of your other methods would go somewhere in this section.
End Class
@Jason you're a genius!