呵呵!你是湖南常德人吗? 我也是啊
问题我找到了一个方法,不知道对不对:
openFileDialog1.FileName = "";
int filterIndexF = 0;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
filterIndexF = openFileDialog1.FilterIndex;
switch (filterIndexF)
{
case 1:
rtBox.LoadFile(openFileDialog1.FileName, RichTextBoxStreamType.RichText);
break;
case 2:
rtBox.LoadFile(openFileDialog1.FileName, RichTextBoxStreamType.PlainText);
break;
case 3:
rtBox.LoadFile(openFileDialog1.FileName,RichTextBoxStreamType.UnicodePlainText);
break;
}