如何加载包含图像和文本的richtextbox文件 [英] How do load richtextbox file having images and text
问题描述
我使用loadfile方法加载richtextbox
1. richTextBoxVision.LoadFile(path)和另一种方法
使用(System.IO.FileStream streamRTF = new System.IO。 FileStream(path,System.IO.FileMode.Open))
{
richTextBoxVision.LoadFile(streamRTF,RichTextBoxStreamType.RichText);
streamRTF.Dispose();
}
这两种方法都有效,但是没有加载rtf文件,文件包含富文本框中的图像
。
那怎么能解决这个问题?
任何想法?
提前感谢..
I load richtextbox using loadfile method
1. richTextBoxVision.LoadFile(path) and another method
using (System.IO.FileStream streamRTF = new System.IO.FileStream(path, System.IO.FileMode.Open))
{
richTextBoxVision.LoadFile(streamRTF, RichTextBoxStreamType.RichText);
streamRTF.Dispose();
}
both method works but doesn't load rtf file having text with images in richtextbox
.
So how could solve this problem ?
any idea?
thanks in advance..
推荐答案
尝试使用System.IO中的File.Copy(源文件路径,复制文件路径)方法。然后看看你是否可以打开副本。
Try using the File.Copy("source file path", "copy file path") method in System.IO. Then see if you can open the copy.
这篇关于如何加载包含图像和文本的richtextbox文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!