Ecco qui il codice
codice:
Public Class download
Private Sub Form_Load()
End Sub
'url.Text = "C:\Documents and Settings\" & Environ$("USERNAME") & "\Desktop"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim folder As New FolderBrowserDialog
If folder.ShowDialog = Windows.Forms.DialogResult.OK Then
url.Text = folder.SelectedPath
End If
Timer1.Enabled = True
End Sub
Private Sub FolderBrowserDialog1_HelpRequest(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FolderBrowserDialog1.HelpRequest
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If url.Text = "" Then
Button2.Enabled = False
Else
Button2.Enabled = True
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim perc As String = url.Text
Dim perc2 As String = url.Text + "\up.php"
MsgBox(perc2)
My.Computer.Network.DownloadFile("http", perc2)
End Sub
End Class
p.s ripeto, è il mio primo "lavoro"