博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Winform 显示远程图片
阅读量:7091 次
发布时间:2019-06-28

本文共 404 字,大约阅读时间需要 1 分钟。

后面的小项目要用到,为了防止忘记,特记录下来:

Image ReadURLImageToStream(string URLimage)

{
Uri uri=new Uri(URLimage);
WebRequest req=WebRequest.Create(uri);
WebResponse resp=req.GetResponse();
Stream str=resp.GetResponseStream();
Image img=Image.FromStream(str);
return img;
}

 

调用:

this.pictureBox1.Image=ReadURLImageToStream(imgPath);

转载于:https://www.cnblogs.com/duguqing40/archive/2013/06/07/Get-Remote-Image-In-Winform.html

你可能感兴趣的文章
Windows常用命令
查看>>
菜鸟学Linux 第053篇笔记 Section 3
查看>>
jquery.multiSelect下拉框多选
查看>>
linux下使用shell脚本自动化部署项目
查看>>
shell查询当前时间
查看>>
e1000 detected Tx Unit Hang
查看>>
nginx自定义站点目录及简单编写开发网页内容讲解
查看>>
查询是谁在用挂载的硬盘
查看>>
JavaScript之number类型的数值转换成某某进制
查看>>
iptables从入门到放弃
查看>>
PHP函数中默认参数的的写法
查看>>
Linux TCP/IP网络管理工具:net-tools VS iproute2
查看>>
linux
查看>>
CentOS6.5+Puppet3.7.3 安装、配置及测试
查看>>
grep、egrep及相应的正则表达式和用法
查看>>
Oracle修改数据文件名/移动数据文件
查看>>
Oracle内部错误:ORA-00600[17175]一例
查看>>
GATHER_STATS_JOB: Stopped by Scheduler. Consider increasing the maintenance window duration if this
查看>>
linux和windows下的clock函数
查看>>
seq命令
查看>>