The declaration for URLDownloadToFile is shown below.
'API function for How to save or download webpages and files without Prompting :
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
The function can be called as
returnValue = URLDownloadToFile(0, "http://www.google.com/", _
"c:\google.html", 0, 0)
Sample project , Copy and paste the code given below : Download sample project
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()
returnValue = URLDownloadToFile(0, "http://www.google.com/", _
"c:\google.html", 0, 0)
End Sub
Tags : How to download files in vb without prompting,save download files from internet using vb ,copy files from internet using vb without user's knowledge , how to pause and resume downloading files using vb ,save webpages using vb without prompting
No comments:
Post a Comment