截取图片网址,将 图片显示到RichTextBox 中
来源:互联网 发布:linux管理员招聘 编辑:程序博客网 时间:2024/06/05 10:25
//文本内容
string content="<img height='164' width='192' src='http://devel.zongzk.com/upload/uuimp_ft/6769/9aa3cc281f2ad5f5534ad36a97e715fe.tmp'>sdfsadfa<img height='164' width='192' src='http://devel.zongzk.com/upload/uuimp_ft/6769/9aa3cc281f2ad5f5534ad36a97e715fe.tmp'>123123";
if (content.Contains("<img"))
{while (content.Trim().LastIndexOf("<img") >= 0)
{
string StrImg = string.Empty;
int ImgStartIndex = content.IndexOf("<img");
string sssss = content.Substring(0, ImgStartIndex);
this.richTextBox1.AppendText(sssss);
int ImgEndIndex = content.IndexOf("'>", ImgStartIndex);
StrImg = content.Substring(ImgStartIndex, ImgEndIndex - ImgStartIndex + 2);
int ImgUrlStartIndex = StrImg.IndexOf("src='");
int ImgUrlEndIndex = StrImg.IndexOf("'>");
string ImgUrl = StrImg.Substring(ImgUrlStartIndex + 5, ImgUrlEndIndex - ImgUrlStartIndex - 5);
image = InterfaceURL.getAvatarByURL(ImgUrl);
Clipboard.SetDataObject(image, false);
richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Bitmap));
Clipboard.Clear();
content = content.Substring(ImgEndIndex + 2, content.Length - ImgEndIndex - 2);
}
}
this.richTextBox1.AppendText(content + "\n");
- 截取图片网址,将 图片显示到RichTextBox 中
- 截屏,并将截取的图片保存到相册中
- WPF RichTextBox 保存图片到字符串 并显示
- c# winform richtextbox将图片插入数据库、读取数据库显示图片
- RichTextBox控件中加入图片
- 向RichTextBox中插入图片
- RichTextBox控件中加入图片
- android将下载的图片显示到媒体相册中
- 图片截取居中显示
- 将图片保存到数据库表中及从数据库表中读取图片并显示
- c#读取数据库中图片路径,将图片保存到imagelist,在listview显示
- 将各类图片显示到桌面
- 将网上图片显示到 View 上
- 将图片贴到另一张图片显示
- RichTextBox中插入图片的方法
- C#中HTML文章中截取摘要,可显示图片
- C#中HTML文章中截取摘要,可显示图片 .
- C#中HTML文章中截取摘要,可显示图片
- zoj 1457 求素数环
- 转 C++头文件
- 最短路径算法—Dijkstra(迪杰斯特拉)算法分析与实现(C/C++)
- zoj 2859 Matrix Searching
- linux 下 C 程序(进程) 内存布局
- 截取图片网址,将 图片显示到RichTextBox 中
- 算法导论22.4-2
- 内核调试文章汇总
- 走马灯
- 单源最短路径
- 谈谈游戏服务器架构设计
- 我的代码之路
- 切换imageView的几种办法
- KIS 标准版 银行存款日记账扎帐后本期期初不等于上期期末余额