Saving text files along with formatting like bold, size, etc

aewarnick

Well-known member
Joined
Jan 29, 2003
Messages
1,031
Is it possible that I could display font from the same textbox or string in different ways. Some of the string being size 14 some being bold, italic. . .
 
I believe the RichTextBox class along with its SaveFile and LoadFile methods should work quite well for that, if I understand you correctly.
 
You can store the text along with its formatting in string like so:

Code:
Dim sText As String = RichTextBox1.Rtf
C#:
string sText = RichTextBox1.Rtf;
 
When I display Rtf in a message box all I see is the rich text formatting not the actual formatted text.
 
You wont get a messagebox showing rich text. That is what a Rich Textbox is for.
 
Back
Top