怎么实现,
请大家帮忙!
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 Const ERROR_SUCCESS As Long = 0
'**********************************************************************
'自定义过程
'**********************************************************************
Private Function DownloadFile(ByVal sURL As String, ByVal sLocalFile As String) As Boolean
DownloadFile = URLDownloadToFile(0, sURL, sLocalFile, 0, 0) = ERROR_SUCCESS
End Function
Private Sub Form_Load()
If DownloadFile("http://bbs.bc-cn.net/UploadFace/122700.gif", IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\") & "DownFile.gif") Then
MsgBox "下载成功!"
Else
MsgBox "下载失败!"
End If
End Sub