RichTextBox中插入图片的方法
来源:互联网 发布:什么是数据漫游 编辑:程序博客网 时间:2024/04/30 03:56
1. 通过剪切板来实现。
public void InsertImage() {
string lstrFile = fileDialog.FileName;
Bitmap myBitmap = new Bitmap(lstrFile);
// Copy the bitmap to the clipboard.
Clipboard.SetDataObject(myBitmap);
// Get the format for the object type.
DataFormats.Format myFormat = DataFormats.GetFormat (DataFormats.Bitmap);
// After verifying that the data can be pasted, paste
if(myRichTextBox.CanPaste(myFormat)) {
myRichTextBox.Paste(myFormat);
}
else {
MessageBox.Show("The data format that you attempted site" +
" is not supportedby this control.");
}
}
- RichTextBox中插入图片的方法
- 向RichTextBox中插入图片
- RichTextBox插入图片。
- RichTextBox插入.gif图片
- RichtextBox 插入图片
- RichtextBox 插入图片
- RichTextBox中插入表格
- c#.net 文本编辑控件——RichTextBox中插入图片
- c#.net 文本编辑控件——RichTextBox中插入图片
- RichTextBox中插入自定义链接
- richtextbox中插入文件路径链接时出错的处理
- JPanel中插入图片的方法
- Qtextedit 中插入图片的方法
- c#控件RichTextBox扩展之插入图片
- RichTextBox控件中加入图片
- RichTextBox控件中加入图片
- r在richtextbox中插入动画/控件
- C#中RichTextBox获得当前行号的方法
- 菜鸟学Python(4):编码问题
- 管理定律
- 汉风操作系统(hanos)
- 反射
- 在JavaScript中控制链接的点击
- RichTextBox中插入图片的方法
- SGI STL V3.2 源码剖析笔记-0. 说明和准备资料
- EJB中的设计模式
- SGI STL V3.2 源码剖析笔记-1. 空间配置器
- 说说"拍马屁"
- xslt 静态化页面的生成程序
- Asp.net(C#)实现验证码功能
- uClinux简介
- 管理十大经典理论