Aggelos Tzitzifas

Aggelos Tzitzifas

  • 1.6k
  • 131
  • 10.9k

how can I refresh a form from another. in Windows Forms

Oct 3 2013 5:17 AM
how can I refresh a form from another.
I have made properties in the program.
  eg:

Main Form, Sub Form

H main opens Sub But I want the value of the sub to the display in Main without having to close and then re opened (Main_Load). through the properties I have made,
But at that time by one second to make renewal.

The Main has a TxtMain.
H Sub has 1 Textbox and a Button.



private void BtnSave_Click (object sender, EventArgs e)
         {
             Properties.Settings.Default ["Price"] = Convert.ToDouble (TxtSUB.Text);
             Properties.Settings.Default.Save ();
         }
 

So when you close the form OnClose () I want to get the property value and puts it in TxtMain.Text. with Main.Refresh () not my work.

Answers (1)