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 vb.net. Make it a great day!
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim client As New WebClient()
Dim imagedata As Byte() = client.DownloadData("http://images2.wikia.nocookie.net/wowwiki/images/e/ed/Icon-new-48×48.png")
Using ms1 As New MemoryStream(imagedata )
Dim i As New Image(ms1)
Catch ex As SystemException