More formats - more power
You can save the contents of your rich textbox in two different formats:
a) with formatting (bold, different sizes, colors, etc.)
b) Straight forward normal boring old text (like notepad)
The SaveFile method has two parameters. The first is the filename of the file you are saving, and the second specifies in which of the two formats you want to save your file. Since you do not specify the second parameter, it defaulted to RTF format, which gave you all the garbage you saw.
So basically, there is nothing wrong with the way you are using the common dialogue control. Try this instead:
Code:
'For normal text
RichTextBox1.SaveFile (Form1.CommonDialog1.FileName, rtfText)
'For formatted text
RichTextBox1.SaveFile (Form1.CommonDialog1.FileName, rtfRTF)
When you save normal text, your file should be saved as .txt, but when you save with formatting, be sure to use the .rtf extension.
You can make your program better than Notepad, by allowing the user the choice of formatted or non-formatted text.
Hope this helps.
Shrog