i make a simple test program that if i press button in the form1, it will change label text in Main Form.
here a code :
In MainForm.cs
void MainShown(object sender, EventArgs e)
{
Form1 frm =new Form1();
frm.ShowDialog();
}
public string Lbl
{
get{
return label1.Text;
}
set{
label1.Text = value;
}
}
code from Form1.cs :
void Button1Click(object sender, EventArgs e)
{
Main main = new Main();
main.Lbl = "UPDATE DONE!!";
main.label1.Refresh();
this.Close();
}
I press button1 and never change the text! please help me...
tks.
Loading

Sam HobbsRank #108 · 20.5K reputationPosted Jul 21, 2010, 6:26 PM EDT
Joko Susilo5 reputationPosted Jul 21, 2010, 6:38 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Jul 21, 2010, 9:06 PM EDT
Joko Susilo5 reputationPosted Jul 21, 2010, 9:54 PM EDT
let's see how the code working ^__^
Sam HobbsRank #108 · 20.5K reputationPosted Jul 21, 2010, 10:43 PM EDT