C#如何把写字板文件、TXT文件读入RichTextBox
2个回答
展开全部
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文件
展开全部
System.Windows.Forms.DialogResult dr;
dr = openfiledialog1.ShowDialog();
if (dr == System.Windows.Forms.DialogResult.OK)
{
richTextBox1.LoadFile(openfiledialog1.FileName, System.Windows.Forms.RichTextBoxStreamType.PlainText);
}
dr = openfiledialog1.ShowDialog();
if (dr == System.Windows.Forms.DialogResult.OK)
{
richTextBox1.LoadFile(openfiledialog1.FileName, System.Windows.Forms.RichTextBoxStreamType.PlainText);
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询