Results 1 to 3 of 3

Thread: downloading using code...

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Posts
    3

    Post


    Does anyone know how to download a file from the internet using code, eg. to make an auto update function etc.

    cheers,

    ------------------------------------------------
    Make Money Using the Internet,
    People are making thousands a month, http://www.alladvantage.com/go.asp?refid=ICC006
    Use Referal Id ICC - 006 when asked.

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Post

    Hi fish.

    You can use a Timer Control with the WebBrowser Control to do this. As long as the location of the Download link doesn't change on the web page, you can use the Sendkeys "{TAB}" and Sendkeys "{ENTER}" with the WB Control to navigate to the link and click it.

    That should be enough to get you started. Put up another post if you have questions.

    All the best.

    ------------------
    OneSource
    The truth may be out there, but it's in here too!
    .


    [This message has been edited by OneSource (edited 02-08-2000).]

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Perhaps an easier method would be to use the Microsoft Internet Transfer Control, ie.
    Code:
    Private Sub Command1_Click()
        Dim iFile As Integer
        Dim bBIN() As Byte
        
        Caption = "Downloading.."
        bBIN = Inet1.OpenURL("www.vb-world.net/images/vbworld.gif", icByteArray)
        iFile = FreeFile
        Open "C:\vbworld.gif" For Binary Access Write As iFile
            Put #iFile, , bBIN
        Close iFile
        Caption = "Download Complete."
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert

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