Kód mám takto
Imports System.Net
Public Class Form1
Private Sub btnStartDownload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim client As WebClient = New WebClient
AddHandler client.DownloadProgressChanged, AddressOf client_ProgressChanged
AddHandler client.DownloadFileCompleted, AddressOf client_DownloadCompleted
client.DownloadFileAsync(New Uri("http://www.techspot.com/downloads/downloadnow/4959/?evp=b310eb5ff1ecef4471889940fd10807d&file=1"), "C:\Users\%username%\Desktop")
Button1.Text = "Stahuji..."
btnStartDownload.Enabled = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
End Sub
Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click
End Sub
Private Sub client_DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
Throw New NotImplementedException
End Sub
Private Sub client_ProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs)
Throw New NotImplementedException
End Sub
Private Function btnStartDownload() As Object
Throw New NotImplementedException
End Function
End Class
ale pořád mi to vrací chybu "žádná metoda, nebo operace není implentována Edit: Tak jsem to zkoušel ještě přesně podle návodu a vrací mi tuto chybu:
Error 1 'Vaule' is not a member of 'System.Windows.Forms.ProgressBar'. C:\Users\Mirka\AppData\Local\Temporary Projects\WindowsApplication1\Form1.vb 17 9 WindowsApplication1
|