Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/07/2005, 20:32
alehawk
 
Fecha de Ingreso: junio-2002
Mensajes: 212
Antigüedad: 22 años, 8 meses
Puntos: 0
Pone esto en un modulo:

Código:
 Public Function LoadWebImageToPictureBox(ByVal pb _
   As PictureBox, ByVal ImageURL As String) As Boolean

        Dim objImage As MemoryStream
        Dim objwebClient As WebClient
        Dim sURL As String = Trim(ImageURL)
        Dim bAns As Boolean

        Try
            If Not sURL.ToLower().StartsWith("http://") _
                 Then sURL = "http://" & sURL
            objwebClient = New WebClient


            objImage = New _
               MemoryStream(objwebClient.DownloadData(sURL))
            pb.Image = Image.FromStream(objImage)
            bAns = True
        Catch ex As Exception

            bAns = False
        End Try

        Return bAns

    End Function
Y para cargar la foto:
LoadWebImageToPictureBox(Me.PictureBox1, "http://www.miurl.com/miimagen.gif")
__________________
Simuladores y Examenes Cisco, Herramientas de Red Online - Tecnologia y Redes