Download Manager:
Download Manager:
Download Manager:
Download Manager:
Download Manager:
Download Manager: Download Manager: Download Manager: Download Manager: Download Manager: Download Manager: Download Manager: Download Manager:
Download Manager: Download Manager:
Download Manager:
Go Back  Xtreme Visual Basic Talk > > > Download Manager:


Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2010, 10:23 AM
Iversen Iversen is offline
Newcomer
 
Join Date: Feb 2010
Posts: 15
Default Download Manager:


I have created a download manager but what is the code to add:
Download speed ( To a Label )
Download File Size ( To a Label )

thats all i need to finnish it i got this For the dwnload manager:
i got:
Code:
1 Timer
1 Folder Browser Dialog
1 Progress bar
5 Labels
3 TextBoxes
1 ComboBox
Code:
Imports System.Net

Public Class Form5
    Dim settings As My.MySettings
    Public WithEvents Download As New WebClient

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Download = New WebClient
        Download.DownloadFileAsync(New Uri(TextBox2.Text), TextBox1.Text + "/" + TextBox3.Text + ComboBox1.Text)
        Timer1.Enabled = True
        My.Settings.Folder = TextBox1.Text
        My.Settings.URL = TextBox2.Text
        My.Settings.Name = TextBox3.Text = My.Settings.Name
        My.Settings.File = ComboBox1.Text
        My.Settings.Save()
    End Sub

    Private Sub Download_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles Download.DownloadProgressChanged
        ProgressBar1.Value = e.ProgressPercentage
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = (ProgressBar1.Value)
        If Label1.Text = 100 Then
            MsgBox("File has ben Downloaded")
            Timer1.Enabled = False
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = ProgressBar1.Value
        Me.TopMost = True
        TextBox2.Text = My.Settings.URL
        TextBox1.Text = My.Settings.Folder
        ComboBox1.Text = My.Settings.File

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        FolderBrowserDialog1.ShowDialog()
        TextBox1.Text = FolderBrowserDialog1.SelectedPath()
    End Sub
End Class
Reply With Quote
Reply

Tags
download, download manager, internet, manager


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Download Manager:
Download Manager:
Download Manager: Download Manager:
Download Manager:
Download Manager:
Download Manager: Download Manager: Download Manager: Download Manager: Download Manager: Download Manager: Download Manager:
Download Manager:
Download Manager:
 
Download Manager:
Download Manager:
 
-->