资源介绍
SaveFileDialog1.Filter = "文本文件(*.txt)|*.txt|RTF格式文件(*.RTF)|*.RTF"
SaveFileDialog1.FilterIndex = 1
SaveFileDialog1.Title = "保存文件"
SaveFileDialog1.InitialDirectory = Application.StartupPath
SaveFileDialog1.RestoreDirectory = True
SaveFileDialog1.ShowDialog()
Fname = SaveFileDialog1.FileName
If (Fname <> "") Then
If (OpenFileDialog1.FilterIndex = 1) Then
RichTextBox1.SaveFile(Fname, RichTextBoxStreamType.PlainText)
Else
RichTextBox1.SaveFile(Fname, RichTextBoxStreamType.RichText)
End If
End If