richtextbox如何加载文档包括RTF,TXT的文件
1个回答
展开全部
System.Windows.Forms.DialogResult dr;
dr = openfiledialog1.ShowDialog();
if (dr == System.Windows.Forms.DialogResult.OK)
{
richTextBox1.LoadFile(openfiledialog1.FileName, System.Windows.Forms.RichTextBoxStreamType.PlainText);
}
openfiledialog1选择要打开的txt
dr = openfiledialog1.ShowDialog();
if (dr == System.Windows.Forms.DialogResult.OK)
{
richTextBox1.LoadFile(openfiledialog1.FileName, System.Windows.Forms.RichTextBoxStreamType.PlainText);
}
openfiledialog1选择要打开的txt
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询