Results 1 to 2 of 2

Thread: How to show progress of downloads?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    1

    Post

    Having trouble finding out how to find the download status in a progress bar (or anything for that matter). Please HELP!!!!

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    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.

    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
    That is, of course, nowhere near correct, but a little close, I hope. It was only an idea anyway. Good luck.

    bob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width