问题描述
如何刷新另一张表格。
我已经在程序中制作了属性。
例如:
主表格,子表格
H main打开Sub但是我想要sub的值到Main中的显示而不必关闭然后重新打开(Main_Load)。通过我所做的属性,
但是在那个时候需要一秒钟来续订。
主要有一个TxtMain。
H Sub有1个文本框和一个按钮。
private void BtnSave_Click( object sender,EventArgs e)
{
Properties.Settings.Default [ Price] = Convert.ToDouble (TxtSUB.Text);
Properties.Settings.Default.Save();
}
所以当你关闭表格OnClose()我想要获取属性值并将其放在TxtMain.Text中。与Main.Refresh()不是我的工作。
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.
这篇关于C Sharp窗体刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!