Save/Load documents - RichtextBox
Use this board to post your code snippets - tips and tricks
2 posts
Page 1 of 1
Hello,
These snips will show you how to both Save and Load documents into a richtextbox.
Save as *.rtf
Saving as *.rtf stores the different styles/sizes and colors of fonts used inside the richtextbox. Saving as plain text will store the text in standard format.
Happy coding
These snips will show you how to both Save and Load documents into a richtextbox.
Save as *.rtf
Code: Select all
Load a *.rtf fileRichTextBox1.SaveFile("filename.rtf", RichTextBoxStreamType.RichText)
Code: Select all
If you want to Save/Load as standard documents then simply change "RichTextBoxStreamType.RichText" to "RichTextBoxStreamType.PlainText"RichTextBox1.LoadFile("filename.rtf", RichTextBoxStreamType.RichText)
Saving as *.rtf stores the different styles/sizes and colors of fonts used inside the richtextbox. Saving as plain text will store the text in standard format.
Happy coding
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023