在网上找的很多都弄不来,这个功能是不是很难实现啊?

解决方案 »

  1.   

    一个用Inet控件下载的函数,第一个参数是下载地址,第二个参数是保存路径.
    Private Function downFile(ByVal Url As String, ByVal savefolder As String) As String
            Dim bytes() As Byte
            '   把文件的字节读到一个Byte数组中
          ' On Error Resume Next
            bytes() = Inet1.OpenURL(Url, icByteArray)
             If Err.Number = 35764 Then Exit Function
          '得出文件名
            Dim tempS
             tempS = Split(Url, "/")
            Dim fname As String
            fname = tempS(UBound(tempS))
           fname = App.Path & "\" & savefolder & "\" & fname
            Open fname For Binary Access Write As #1
                    Put #1, , bytes()
            Close #1
          downFile = fname
    End Function
      

  2.   

    使用WinSocket控件,实现多线程的下载方式
      

  3.   

    urldownloadfile
    这个API函数不知道有没有拼错
      

  4.   

    http://www.m5home.com/blog/article.asp?id=395
      

  5.   

    Option Explicit
    Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long '-下载文件
    Private Sub Command1_Click()
       URLDownloadToFile 0, "http://cbm666.com/v.gif", "C:\aa.gif", 0, 0
    End Sub