Results 1 to 3 of 3

Thread: Downloading Files

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Manchester, UK
    Posts
    50

    Angry

    I'm getting really annoyed with this now. I want to download an .exe file from a HTTP server (NOT FTP), displaying how much is completed every second (e.g Downloaded 3K of 501K at 4.1K/Sec).

    Please help me!

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Posts
    81
    Well I'm pretty sure you can't do it with the internet transfer control, if that's what you're trying. I think that once you set it off, it doesn't come back til it's finished or failed. C'est la vie! Perhaps we'll get something a bit more sophisticated with VB7. Here's hoping!

    Toot.
    Some cause happiness wherever they go; others, whenever they go.

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Thumbs up

    The Inet Control will do this

    Code:
    Private Sub Command1_Click()
    
    Dim Bytes() As Byte
    
    Bytes = Inet1.OpenURL("http://www.ozemail.com.au/~devore/WIN32.zip", icByteArray)
    
    Open "C:\This.zip" For Binary As #1
        Put #1, , Bytes
    Close
    
    End Sub
    But if you need to graph it then you want an async download so with update event.

    Start a new user control which can use the Read async. The object browser of an new usercontrol has this to say


    Sub AsyncRead(Target As String, AsyncType As Long, [PropertyName], [AsyncReadOptions])
    Member of Unknown2._UserControl
    Read in data asynchronously from a path or a URL and receive AsyncReadComplete event.

    and

    Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)

    End Sub

    Cheers from the "land of the drunken bum!"'

    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

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