Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: E N T E R en Noviembre 27, 2012, 12:15:46 am
-
Encontré este código de casualidad y me pareció interesante por que tiene muy poco código.
Fuente: http://msdn.microsoft.com/es-ar/library/Aa719110 (http://msdn.microsoft.com/es-ar/library/Aa719110)
Referencia VB6
(http://www.mediafire.com/conv/cfc0bc1b21d7a7e738751caebb3b958cc948c4c308a95e29ca84d7e9ee703f184g.jpg) (http://www.mediafire.com/view/?o5jnf951844vj6f)
Private Sub Command1_Click()
Dim webDownload As System.WebClient
Set webDownload = New System.WebClient
webDownload.downloadFile "http://www.cocinaya.com/files/cocinaya.com/fotos_articulos/tomate_9.jpg", App.Path & "\latest_westir.jpg"
Set Image1.Picture = LoadPicture(App.Path & "\latest_westir.jpg")
End Sub
Si tienen Win 7 64bits., tiene que registrar el : system.dll
regasm system.dll
-
no entiendo porque usar algo de .NET en VB6, podes bajar una imagen con apis facilmente o hasta sin apis, y tambien esta el AsyncDownload de los usercontrols.
-
Es solo un aporte amigo, solo me pareció interesante y hay muchas mas cosas que se puede hacer.
Link
http://msdn.microsoft.com/es-es/vbrun/ms788241 (http://msdn.microsoft.com/es-es/vbrun/ms788241)