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 :)

Recommended Answers

All 4 Replies

You can save value to session or database when user leave your form.
With some javascript it will not be the problem.
Then next time you open it first search is it something in database or session if it is then populate this form.

You 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

Cool, Ill give it a try.

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.