views:

460

answers:

3

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?

+4  A: 

try:

pictureBox1.ImageLocation = "http://www.indianorphanages.net/images/
                        india-political-map.gif";
TheVillageIdiot
You beat me to it!
Colin Mackay
It is showing only blank image is there any thing i missed
Nagu
It takes some time to load it.
TheVillageIdiot
yes it is working thank you
Nagu
+1  A: 

Just set the ImageLocation property like this:

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

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.

ChrisF