Search Tools Links Login

Download A File From The Internet2


Visual Basic 6, or VB Classic

This File Allows You To Download Files From The Internet.
The Source Code Is Fairly Easy To Use Too!

Original Author: Aden R

Code

'Insert This In A Space In The Form
'Not Between Any Other Pieces Of Code Though
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
ret = DownloadFile("http://www.URL Of The File", _
"c:Which Dir To Save The File To.jpg, exe etc.")

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 112 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.