{//打开文件对话框
    this.openFileDialog1.Filter="*.txt|*.txt|所有文件(*.*)|*.*";
    if(this.openFileDialog1.ShowDialog()==DialogResult.OK)
    {
     try
     {
      string Name=this.openFileDialog1.FileName;  
      richTextBox1.LoadFile(Name,RichTextBoxStreamType.PlainText);
      this.statusBarPanel1.Text=Name;
     
     }
     catch(Exception){}
    }

posted on 2010-02-21 20:14  努力实现目标  阅读(5643)  评论(0编辑  收藏  举报