Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello Guys..

 

I would like to create a small windows based program that grabs images/info from a website..

 

i have some things sorted but i dont know how to grab the graphics side ?

 

how can i load an image into a picturebox from a web address ?

 

i have tried :

 

picturebox1.image.fromfile("www.domainname.com/images/gfx.gif")

 

but i get an error , i know that i can use this to display an image from my pc but how do i do this from web?

 

Regards

Carl

  • *Experts*
Posted

You can do it using the WebClient class:

Dim dl As New Net.WebClient 'create new instance
dl.DownloadFile("http://www.youraddress.com/image.gif", "C:\image.gif")
'download the file using DownloadFile method to a specified path
p.Image = Image.FromFile("C:\image.gif") 
'load the image from the path you downloaded it to

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...