Having trouble finding out how to find the download status in a progress bar (or anything for that matter). Please HELP!!!!
Printable View
Having trouble finding out how to find the download status in a progress bar (or anything for that matter). Please HELP!!!!
I wonder if you could perhaps get the total file size and the current file size. The total file size mightn't be too difficult, and neither should continually sampling the size of the downloading file in progress. then simply divide the current/total to get percent. Perhaps use the GetFileSize API in the Win32api library.
That is, of course, nowhere near correct, but a little close, I hope. It was only an idea anyway. Good luck.Code:Public Declare Function GetFileSize Lib "kernel32" Alias "GetFileSize" (ByVal hFile As Long, lpFileSizeHigh As Long) As Long
Private Sub Command1.Click()
Tot = GetFileSize("File being copied,something)
Start downloading
End Sub
Private Sub Timer1_Timer()
Part = GetFileSize("Downloading file",something)
Text1.Text = Part/Tot * 100
End Sub
bob