vb如何指定地址下载这个地址的文件
来源:百度知道 编辑:UC知道 时间:2024/05/04 17:23:11
比如www.a\a.rar
让它下载下来如何实现
让它下载下来如何实现
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
SUB DOWNLOAD(URL AS STRING)
URLDownloadToFile 0, URL, APP.PATH & "\YOURNAME.RAR", 0, 0
END SUB
Private Sub Command1_Click()
DOWNLOAD("http://A.COM/A.EXE")
END SUB
API函数:URLDownloadtofile