merlin82

merlin82

  • NA
  • 4
  • 0

Help me with ProgressBar!!!

Dec 22 2005 11:46 AM
Hi. I'm trying to make a ProgressBar which will show progress of loading an image from a web site. Here is a code I use right now to load this image. I know that I have to make a new thread but I don't know how to do it. Maybe some can help me in this?? Here is a code responsible for loading image: public Image GetImage(string sURL) { Stream str = null; HttpWebRequest wReq = (HttpWebRequest)WebRequest.Create(sURL); HttpWebResponse wRes = (HttpWebResponse)(wReq).GetResponse(); str = wRes.GetResponseStream(); return Image.FromStream(str); } And i'm using this to set an image to a PictureBox info.zdjecie.Image = info.GetImage(info.zdjecie.Tag.ToString()); I want a ProgressBar to work like in a broswer while loading a site.