image from URL

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hello...
I'm want to assign to my PictureBox.Image property image from some web
suite... i have an URL and so... but how can i do that?
 
David said:
Hello...
I'm want to assign to my PictureBox.Image property image from some web
suite... i have an URL and so... but how can i do that?


This is the method i use;

try

{

WebRequest req=WebRequest.Create(sURL);

WebResponse rsp=req.GetResponse();

Image img = Image.FromStream(rsp.GetResponseStream());

this.picturebox1.Image = img;

}

catch

{

MessageBox.Show("Error loading picture");

}





rgds Dave.
 
Back
Top