In a form in winform application i have to show images (multiple images) stored on webserver. There is no problem in showing images as i can simple assign URL to picturebox.
picturebox1.ImageLocation = "http://example.com/Image.jpg";
That form will be opened many times frequently, right now each time form is opened, images are being downloaded every time. It is unnecessary increasing traffic.
Is it possible to tell picturebox to cache image (as Browser do), so next time same images is requested, it should load quickly. Is that possible?
Pre-load the image(s) with
Image img = Image.FromFile("...");
Then you can give the image to the PictureBox:
pictureBox1.Image = img;
You can store the image in a temp folder and check the temp the folder first when opening the form.