Sinisterly
How to do a download and excute script in VB6? - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: How to do a download and excute script in VB6? (/Thread-How-to-do-a-download-and-excute-script-in-VB6)



How to do a download and excute script in VB6? - S1lentZ - 06-20-2011

I'v tried methods in VB 2008/2010 but it wont work on VB6 :/


RE: How to do a download and excute script in VB6? - S1lentZ - 06-22-2011

any1? .


RE: How to do a download and excute script in VB6? - Coder-san - 06-22-2011

[link=http://allapi.mentalis.org/apilist/URLDownloadToFile.shtml]ALLAPI.net - URLDownloadToFile[/link]

Code:
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 Private Sub Form_Load() 'example by Matthew Gates (Puff0rz@hotmail.com) DownloadFile "http://www.allapi.net", "c:\allapi.htm" End Sub