Results 1 to 3 of 3

Thread: Easy HTTP download

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Location
    Minnesota
    Posts
    91

    Easy HTTP download

    what is the easiest way that you have your program download files from a webpage???
    thanks!
    -=DB=-

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    The inet control's pretty easy to use!

  3. #3
    Matthew Gates
    Guest
    The URLDownloadToFile API function is pretty good to use as well.


    VB Code:
    1. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
    2. "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As _
    3. String, ByVal szFileName As String, ByVal dwReserved As Long, _
    4. ByVal lpfnCB As Long) As Long
    5.  
    6. Private Function DownloadFile(URL As String, _
    7.     LocalFilename As String) As Boolean
    8.     Dim lngRetVal As Long
    9.     lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
    10.     If lngRetVal = 0 Then DownloadFile = True
    11. End Function
    12.  
    13. Private Sub Command1_Click()
    14.     DownloadFile "http://www.vb-world.net", "c:\vbworld.htm"
    15. End Sub

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