ABRIR MSGBOX AO TERMINO DO DOWNLOAD
Usei um progressbar no programa, então tentei desses dois jeitos:
If ProgressBar.Value = 100 Then
MsgBox([Ô]Download ConcluÃdo![Ô])
End If
If ProgressBar.Value > 99 Then
MsgBox([Ô]Download ConcluÃdo![Ô])
End If
Mas não deu! O que devo usar? Veja todo o código:
Citação:Imports System.Net
Public Class Form1
WithEvents webclient1 As New WebClient
WithEvents webclient2 As New WebClient
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = [Ô][Ô] Then
MsgBox([Ô]Favor colocar o link para download.[Ô])
End If
If TextBox2.Text = [Ô][Ô] Then
MsgBox([Ô]Favor colocar o caminho de destino.[Ô])
End If
If TextBox1.Text <> [Ô][Ô] OrElse TextBox2.Text <> [Ô][Ô] Then
webclient2.DownloadFileAsync(New Uri(TextBox1.Text), TextBox2.Text)
End If
Button1.Visible = False
Label3.Visible = True
End Sub
Private Sub webclient2_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles webclient2.DownloadProgressChanged
ProgressBar1.Maximum = e.TotalBytesToReceive
ProgressBar1.Value = e.BytesReceived
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start([Ô]http://howardevelopments.blogspot.com.br/[Ô])
End Sub
End Class
If ProgressBar1.Value = ProgressBar1.Maximum Then
MessageBox.Show([Ô]Download Feito[Ô], [Ô]Download[Ô], MessageBoxButtons.OK)
end if