first poster, a long time reader, so feel free to me :)
I am writing an application that reads in a folder with folders and allows you to upload an image for each folder. There is a WebBrowser control in which you can go to a specific image and click the "use this image for the selected folder" button.
Each "folder" is represented as an object with its own loading method, which uses the WebClient inside ThreadWorker Thread.
When I set the image URL for an object, it runs the background executor of that object and runs this code
using (WebClient client = new WebClient())
{
client.Proxy = null;
Stream stream = client.OpenRead(BackdropUrl);
Bitmap bitmap = new Bitmap(stream);
stream.Flush();
stream.Close();
e.Result = bitmap;
}
I also use the webclient in my main thread to do some simple html scraping.
, . , , , , , - . webbrowser, webclient, , , :
Stream stream = client.OpenRead(BackdropUrl);
Bitmap bitmap = new Bitmap(stream);
, , . , - Bitmap? , ?
.