help loading graphics please

hawk1ns

Active member
Joined
Jun 10, 2003
Messages
37
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
 
You can do it using the WebClient class:
Code:
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
:)
 
Back
Top