C# Visual Studio 2005中RichTextBox打开文件为rtf格式
string str;
openFileDialog1.DefaultExt = "*.rtf";
openFileDialog1.Filter = "Text.File(*.rtf)|*.rtf|All File(*.*)|*.*";
openFileDialog1.ShowDialog();
str = openFileDialog1.FileName;
richTextBox1.LoadFile(str);
string str;
openFileDialog1.DefaultExt = "*.rtf";
openFileDialog1.Filter = "Text.File(*.rtf)|*.rtf|All File(*.*)|*.*";
openFileDialog1.ShowDialog();
str = openFileDialog1.FileName;
richTextBox1.LoadFile(str);