How to make a DL Manager
There are a few ways to do this, but i'ma do it my way.
The stuff in red you MUST type, or else it won't work
(ingor the praenthesis if you are making an actual download manager)
You will need-
Progress Bar(optional)
2 Buttons
2 Text box (or 1, depends on what you are making)
2 Labels (1 optional)
1. Start a new project.
2. Put the items out on the form. something like this...

3. Now, first type this at the top,
[highlight=vb.net]Imports System.Net[/highlight]
then, under 'public class form1', type this
[highlight=vb.net]Private WithEvents httpclient As WebClient[/highlight]
Now, for button1, type this
[highlight=vb.net] If TextBox1.Text = "" Then
MsgBox("Please choose where you want to download the update.", MsgBoxStyle.Exclamation, "Error") 'Makes sure that thers not nothing there.
Else
If My.Computer.FileSystem.DirectoryExists(TextBox2.Te xt) Then 'Makes sure its a valad directory.
If TextBox2.Text = "" Then
MsgBox("Please insert a direct link.", MsgBoxStyle.Exclamation, "Error") 'Makes sure thers not nothing there.
Else
httpclient = New WebClient 'New httpclient
Dim sourceURL = Textbox1.Text 'The link
Dim filedir = TextBox2.Text 'The file directory.
ProgressBar1.Value = 0 'Starts at 0%, mainly if your doing more than one download
ProgressBar1.Maximum = 100 'This just makes sure it doesn't go overboard
Try
httpclient.DownloadFileAsync(New Uri(sourceURL), (filedir)) 'Tries to download
Catch ex As Exception
MsgBox("Failed " & vbNewLine + ErrorToString(), MsgBoxStyle.Critical) 'Fail msgbox.
End Try
End If
Else
MsgBox("Please insert a correct directory.", MsgBoxStyle.Exclamation, "Error") 'If its an incorrect directory, this will come up...
End If
End If[/highlight]
4. Now for button 2, type out
[highlight=vb.net] Dim save As New SaveFileDialog
save.Filter = "All files (*.*)|*.*" 'Any file type can go here, insert your own
save.Title = "Download Directory" 'SaveFileDialog directory title
save.ShowDialog() 'Opens dialog
TextBox2.Text = save.FileName 'This enters the directory into textbox2[/highlight]
5. Now, for the progress bar to work, type this
[highlight=vb.net]Private Sub httpclient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles httpclient.DownloadProgressChanged
ProgressBar1.Value = e.ProgressPercentage 'Makes the progress bar work
Label3.Text = "Progress: " & Me.ProgressBar1.Value & "%" 'Puts the progress bar % in the label
End Sub[/highlight]
6. Now your done! The full code should look like this...

Credits:
Me
YouTube
Mircosoft
add, 'This is the best TuT ever, to your code and get FREE vip h4x
The stuff in red you MUST type, or else it won't work

(ingor the praenthesis if you are making an actual download manager)
You will need-
Progress Bar(optional)
2 Buttons
2 Text box (or 1, depends on what you are making)
2 Labels (1 optional)
1. Start a new project.
2. Put the items out on the form. something like this...

3. Now, first type this at the top,
[highlight=vb.net]Imports System.Net[/highlight]
then, under 'public class form1', type this
[highlight=vb.net]Private WithEvents httpclient As WebClient[/highlight]
Now, for button1, type this
[highlight=vb.net] If TextBox1.Text = "" Then
MsgBox("Please choose where you want to download the update.", MsgBoxStyle.Exclamation, "Error") 'Makes sure that thers not nothing there.
Else
If My.Computer.FileSystem.DirectoryExists(TextBox2.Te xt) Then 'Makes sure its a valad directory.
If TextBox2.Text = "" Then
MsgBox("Please insert a direct link.", MsgBoxStyle.Exclamation, "Error") 'Makes sure thers not nothing there.
Else
httpclient = New WebClient 'New httpclient
Dim sourceURL = Textbox1.Text 'The link
Dim filedir = TextBox2.Text 'The file directory.
ProgressBar1.Value = 0 'Starts at 0%, mainly if your doing more than one download
ProgressBar1.Maximum = 100 'This just makes sure it doesn't go overboard
Try
httpclient.DownloadFileAsync(New Uri(sourceURL), (filedir)) 'Tries to download
Catch ex As Exception
MsgBox("Failed " & vbNewLine + ErrorToString(), MsgBoxStyle.Critical) 'Fail msgbox.
End Try
End If
Else
MsgBox("Please insert a correct directory.", MsgBoxStyle.Exclamation, "Error") 'If its an incorrect directory, this will come up...
End If
End If[/highlight]
4. Now for button 2, type out
[highlight=vb.net] Dim save As New SaveFileDialog
save.Filter = "All files (*.*)|*.*" 'Any file type can go here, insert your own
save.Title = "Download Directory" 'SaveFileDialog directory title
save.ShowDialog() 'Opens dialog
TextBox2.Text = save.FileName 'This enters the directory into textbox2[/highlight]
5. Now, for the progress bar to work, type this
[highlight=vb.net]Private Sub httpclient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles httpclient.DownloadProgressChanged
ProgressBar1.Value = e.ProgressPercentage 'Makes the progress bar work
Label3.Text = "Progress: " & Me.ProgressBar1.Value & "%" 'Puts the progress bar % in the label
End Sub[/highlight]
6. Now your done! The full code should look like this...

Credits:
Me
YouTube
Mircosoft
add, 'This is the best TuT ever, to your code and get FREE vip h4x


