Download an Image into a byte array with

Good Morning! It was a relaxing weekend of sorts. I figured out a SQL statement for work that was really being a pain in the butt and helped a friend out. Other than that, it was pretty relaxing.

Today’s topic is how to download an image into a byte array using Make it a great day!

Join me on Facebook

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim client As New WebClient()
        Dim imagedata As Byte() = client.DownloadData("×48.png")
        Using ms1 As New MemoryStream(imagedata )
            Dim i As New Image(ms1)
            Me.Image= i
        End Using
    Catch ex As SystemException
    End Try
End Sub

Technorati Tags: ,,,,,,,,,,,,,,,,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: