Israel

Israel

  • NA
  • 1.3k
  • 204.4k

How can I keep the last txtbox values after close and reopen

Aug 1 2016 11:36 AM
Hi!
 
I need a solution to my codes please. I have two forms (Form1 and Form2). On Form1 I have two textboxes (frm1txt1.Text and frm1txt2.Text) and on Form2 (txt1.Text and txt2.Text).
From Form2 when I fill the txt1.Text to send value to Form1 (Frm1txt1.Text) when I click to my button for sending its works. When I reopen the Form2 to fill the Txt2.Text to send on frm1Text2.Text. Curiosly, the last text wrotten from Form2 (Text1.Text) to be sent to Form1 (frm1Text1.Text) it's deleted. Then how can I do to keep the last text values on Form1 without be deleted.
 
See my codes:
 
from1 frm1 =  new FormToPrint(); 
 
frm1.Text1.Text = Text1.Text.ToString();
frm1.Show();

Answers (3)