0

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

3
Contributors
4
Replies
16
Views
2 Years
Discussion Span
Last Post by Reverend Jim
0

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.

0

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
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.