Hi ich hab hier den folgenen code:
wie kann ich machen das wenn
fertig ist das sofort die progressbar auf value 0 spring und sofort mit
anfängt??
VB.NET-Quellcode
- Public Class Form1
- Public WithEvents wb As New System.Net.WebClient
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
- Private Sub wb_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wb.DownloadFileCompleted
- End Sub
- Private Sub wb_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wb.DownloadProgressChanged
- ProgressBar1.Value = e.ProgressPercentage
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- wb.DownloadFileAsync(New Uri("http://dl.cdn.chip.de/downloads/98766/VirtualPC2007Sp1.exe?1310150989-1310158489-38f36b-B-606938c1d265eeafc7cabb11d1fc6276.exe"), Application.StartupPath & "\Virtual PC 2007.exe")
- ListBox1.Items.Add("Virtual PC 2007.exe")
- If ProgressBar1.Value = ProgressBar1.Maximum Then
- ProgressBar1.Value = 0
- wb.DownloadFileAsync(New Uri("http://dl.cdn.chip.de/downloads/98766/VirtualPC2007Sp1.exe?1310150989-1310158489-38f36b-B-606938c1d265eeafc7cabb11d1fc6276.exe"), Application.StartupPath & "\Virtual PC 2008.exe")
- ListBox1.Items.Add("Virtual PC 2008.exe")
- End If
- End Sub
- End Class
wie kann ich machen das wenn
fertig ist das sofort die progressbar auf value 0 spring und sofort mit
anfängt??