陈宝刚---享受生活,追逐梦想!
理想是心中的火焰,有追求的人才是幸福的人!
1.绝对路径:
this.pictureBox2.Image=Image.FromFile("D:\\001.jpg");

2.相对路径:
Application.StartupPath; 
可以得到程序根目录 
string picPath=Application.StartupPath+"\\1.gif";

3.获得网络图片的路径

this.pictureBox2.Image= Image.FromStream(System.Net.WebRequest.Create(http://www.xyhhxx.com/images/logo/logo.gif).GetResponse().GetResponseStream()); 
posted on 2008-12-22 21:26  追梦人RUBY  阅读(1604)  评论(0编辑  收藏  举报