Hola!!
1-Agrega un control Inet (Microsoft Internet Transfer Control)
2-Agrega un Command
2-Agrega el CODE
Código vb:
Ver originalPrivate txtUrl As String
Private Sub Command_Click()
txtUrl = "http://yeray.venimdepoble.com/Imagenes/goldman2.jpg"
With Inet
.AccessType = icUseDefault
.URL = txtUrl
.Execute , "GET"
End With
End Sub
Private Sub Inet_StateChanged(ByVal State As Integer)
Dim vtData As Variant, nomArchivo As String
Dim bDone As Boolean, tempArray() As Byte
nomArchivo = Right(Inet.URL, Len(Inet.URL) - InStrRev(Inet.URL, "/"))
Select Case State
Case icResponseCompleted
bDone = False
filesize = Inet.GetHeader("Content-length")
contenttype = Inet.GetHeader("Content-type")
Open App.Path & "\" & nomArchivo For Binary As #1
vtData = Inet.GetChunk(1024, icByteArray)
DoEvents
If Len(vtData) = 0 Then
bDone = True
End If
Do While Not bDone
tempArray = vtData
Put #1, , tempArray
vtData = Inet.GetChunk(1024, icByteArray)
DoEvents
If Len(vtData) = 0 Then
bDone = True
End If
Loop
Close #1
'Carga la imagen
img.Picture = LoadPicture(App.Path & "\" & nomArchivo)
Kill App.Path & "\" & nomArchivo
End Select
End Sub
Puedes ver mas metodos en:
http://www.recursosvisualbasic.com.a...gar-imagen.htm