This has been a question posted to me on an internet site. Initially i thought this had to be simple. But then I realized, in order to do this you need to do a few lines of coding. This was for a Pocket PC application. But anyways coding would not change much for any other platform.
Here it is:
'Give the url as a string
private void LoadImage1(string url, PictureBox pb){
HttpWebRequest wReq = null;
HttpWebResponse wRes = null;
try{
wReq = (HttpWebRequest)WebRequest.Create(url);
wRes = (HttpWebResponse)wReq.GetResponse();
pb.Image = new System.Drawing.Bitmap(wRes.GetResponseStream());
}
catch(Exception ex){
string s = ex.Message;
}
finally {
wRes.Close();
}
}
Wednesday, May 04, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment