Nagu
Nagu

Reputation: 5114

Picture Box image source is it possible?

Hi I want to set dynamic path to my picture box in winforms. Is it possible to do like this

my image is here some thing like

http://www.indianorphanages.net/images/india-political-map.gif

now I want to bind it to picture box (winforms)

Is it possible?

Upvotes: 2

Views: 10475

Answers (3)

TheVillageIdiot
TheVillageIdiot

Reputation: 40497

Try:

pictureBox1.ImageLocation =
                "http://www.indianorphanages.net/images/india-political-map.gif";

Upvotes: 12

ChrisF
ChrisF

Reputation: 137128

To update a picture box from a file you can use the Load method:

pictureBox.Load(filename);

From the help:

Load(String) Sets the ImageLocation to the specified URL and displays the image indicated.

Upvotes: 3

Colin Mackay
Colin Mackay

Reputation: 19175

Just set the ImageLocation property like this:

pictureBox1.ImageLocation = "http://www.indianorphanages.net/images/india-political-map.gif";

Upvotes: 2

Related Questions