VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Ghost A Download

by CovertLoop (12 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This code downloads anything off the internet without popping up a dialog box of any sort. Very simple to use. Vote if ya wanna.

Inputs
Don't forget about the declarations.
Assumes
Don't forget about the declarations.
Code Returns
Don't forget about the declarations.
Side Effects
Don't forget about the declarations.
API Declarations
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
Public Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function

Rate Ghost A Download

G = DownloadFile("UrlOfTheFileToDownload", "c:\windows\desktop\FileName.htm")

Download this snippet    Add to My Saved Code

Ghost A Download Comments

No comments have been posted about Ghost A Download. Why not be the first to post a comment about Ghost A Download.

Post your comment

Subject:
Message:
0/1000 characters