Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
Form 1 label value is a. when i close form 2 i want reset the form 1 label value=b.
i do the closing event to set the value that value assigned but not reset pls help me... how to reset the form 1 label value ..

Thank's in advance...
Posted
Comments
Sergey Alexandrovich Kryukov 21-Mar-13 2:54am    
First, you did not define what is "reset" for a label. Then, why? Usually, labels never change; changing then confuses the user.
—SA

1 solution

try to use form name with label for ex Form1.Label1.Text=""
 
Share this answer
 
Comments
Athi Varathan 21-Mar-13 2:55am    
hi gopi,
i have done like this .. but not working..
formAA label.text="new";
when i close formBB -> closing event i want to change formAA.label.text="new code"; this value assigned but not set to the formAA it agin th e same formaa.text="new".

but i want the chenge label.text="new code".. pls and thank'e 4 ur rply
Gopinath_Rajan 21-Mar-13 3:07am    
k try to use get set properties
like below

public string LabelText
{
get
{
return this.labelX1.Text;
}
set
{
this.labelX1.Text = value;
}
}


form2 frm2 = new form2();
frm2.LabelText = "Your Text";

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