hello, i´m tryin to save the content of a richtextbox in a new file using a function in c sharp similar to visual basic getfile() function, basically i need to save the content of a richtextbox in a new file and then if the user wants recall this file, can you hekp me what function i need to use?
trhanks
Loading
Mike GoldPosted May 14, 2007, 3:37 PM
From MSDN:
[C#]
public void CreateMyRichTextBox()
{
RichTextBox richTextBox1 = new RichTextBox();
richTextBox1.Dock = DockStyle.Fill;
richTextBox1.LoadFile("C:\\MyDocument.rtf");
richTextBox1.Find("Text", RichTextBoxFinds.MatchCase);
richTextBox1.SelectionFont = new Font("Verdana", 12, FontStyle.Bold);
richTextBox1.SelectionColor = Color.Red;
richTextBox1.SaveFile("C:\\MyDocument.rtf", RichTextBoxStreamType.RichText);
this.Controls.Add(richTextBox1);
}