Hello!
I need to know this:
How do i write something in a rich text box, then close the form,
then next time I run it, the form will keep that text?
Thanks :)
TonyTGI 0 Newbie Poster
Recommended Answers
Jump to PostYou can create a String Settings variable (see project -> properties) then add the following code
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load RichTextBox1.Rtf = My.Settings.RichText End Sub Private Sub Form1_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing My.Settings.RichText = RichTextBox1.Rtf End Sub
All 4 Replies
milil 24 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
TonyTGI 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.