title: Downloading and loading an image into a picturebox
body: <p>I have a little problem with downloading an image from google using VB.net</p>
  
  <p>now, here's the thing:</p>
  
  <p>if i use this code to download the file, then VB will download the file, but it's only 1 kb. However, the images 'im trying to download are between 60 and 120 kb.</p>
  
  <pre><code>My.Computer.Network.DownloadFile(StrUrl, StrPath &amp; "Photo.jpg")
  </code></pre>
  
  <p>conclusion: can't use this downloaded file in a PictureBox.</p>
  
  <p>So, I tried downloading using the webclient, which i did as follows:</p>
  
  <pre><code>Dim WbClient As New WebClient
          WbClient.DownloadFile(StrUrl, StrPath &amp; "Photo.jpg")
          WbClient.Dispose()
  </code></pre>
  
  <p>So this downloaded file is the actual size of the image. BUT:
  when i want to load this into a PictureBox, it wouldn't load. Even when I try to open it with my pictureviewer from windonws, it doesn't open neighter.</p>
  
  <p>(Note that if I download the images manually, it works fine)</p>
  
  <p>then there's just one more thing:
  I alos tried to load the images in two different ways into the picturebox.
  and i did it like so:</p>
  
  <p>way 1:</p>
  
  <pre><code>PictureBox1.ImageLocation = StrPath &amp; "Photo.jpg"
  </code></pre>
  
  <p>way 2:</p>
  
  <pre><code>PictureBox1.Image = Image.FromFile(StrPath &amp; "Photo.jpg")
  </code></pre>
  
  <p>But no success....</p>
  
  <p>Anyone of you guys can help me? cuz I am really getting frustrated about it :(</p>
  
  <p>thanks!</p>