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 HobbsPosted Jul 22, 2010, 2:43 AM
Joko SusiloPosted Jul 22, 2010, 1:54 AM
let's see how the code working ^__^
Sam HobbsPosted Jul 22, 2010, 1:06 AM
Joko SusiloPosted Jul 21, 2010, 10:38 PM
Sam HobbsPosted Jul 21, 2010, 10:26 PM