TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Joko Susilo
NA
5
2.1k
update label from other windows form
Jul 21 2010 3:11 AM
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.
Reply
Answers (
5
)
My Problem Haven't been solved !!!
XML serialization with Boolean variables