C# picturebox 读取图片 的获得图片路径的几种方法
2017-03-01 11:08
1501 查看
1.绝对路径:
this.pictureBox2.Image=Image.FromFile("D:\\001.jpg");
2.相对路径:
Application.StartupPath;
可以得到程序根目录
this.pictureBox2.Image=Image.FromFile(Application.StartupPath "\\1.gif");
3.获得网络图片的路径
this.pictureBox2.Image= Image.FromStream(System.Net.WebRequest.Create(http://www.pxkt.com/logo.gif).GetResponse().GetResponseStream());
this.pictureBox2.Image=Image.FromFile("D:\\001.jpg");
2.相对路径:
Application.StartupPath;
可以得到程序根目录
this.pictureBox2.Image=Image.FromFile(Application.StartupPath "\\1.gif");
3.获得网络图片的路径
this.pictureBox2.Image= Image.FromStream(System.Net.WebRequest.Create(http://www.pxkt.com/logo.gif).GetResponse().GetResponseStream());
相关文章推荐
- C#读取路径的几种方法
- 用C#读取图片的EXIF信息的方法(一)
- C#获取文件路径的几种方法
- C#中获取当前路径的几种方法
- c# 获取运行时路径的几种方法
- WinForm 几种获得应用程序启动路径的方法
- 用C#读取图片的EXIF信息的方法
- pictureBox1.Image的获得图片路径的三种方法
- 学习:C#中获取当前路径的几种方法(转)
- C#中获取当前路径的几种方法
- C#获取文件路径的几种方法
- java获得绝对路径 的几种方法
- C#中几种获取路径方法
- C# 读取excel 几种方法的集合 读取excel多sheet
- pictureBox1.Image的获得图片路径的三种方法
- java获得绝对路径 的几种方法
- 用C#编程从数据库中读取图片数据导进Excel文件的方法
- 用C#读取图片的EXIF信息的方法(一)
- c# 图像读取几种方法
- C#中几种获取路径方法