Hello guys,
Iam working on a Download Manager, but I dont know the codes for calculating the download time and how to stop ( not cancel) the download and then continue it. Perhaps the codes for the Download-speed,percentage and size could help you.
I hope you can help me.Code:Public Sub ChangeTexts(ByVal length As Long, ByVal position As Integer, ByVal percent As Integer, ByVal speed As Double) Me.lblsize.Text = "Size : " & Math.Round((length / 1024), 2) & " KB" Me.lblstat.Text = "Status : " & Math.Round((position / 1024), 2) & " KB of " & Math.Round((length / 1024), 2) & "KB (" & Me.ProgressBar1.Value & "%)" Me.lblpercent.Text = Me.ProgressBar1.Value & "%" If speed = -1 Then Me.lblspd.Text = "Speed : " & "calculating..." Else Me.lblspd.Text = "Speed : " & Math.Round((speed / 1024), 2) & " KB/s" End If Me.ProgressBar1.Value = percent End Sub




Reply With Quote
