Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can I refresh a form from another.
I have made properties in the program.
  eg:
C#
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.


C#
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.
Posted
Updated 2-Oct-13 23:27pm
v2

 
Share this answer
 
C#
this.ParentForm.Textbox1.Text = "Somevalue";


C#
this.ParentForm.Refresh();
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900