문제

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?

도움이 되었습니까?

해결책

Try:

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

다른 팁

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.

Just set the ImageLocation property like this:

pictureBox1.ImageLocation = "http://www.indianorphanages.net/images/india-political-map.gif";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top