Click here to Skip to main content
13,052,641 members (58,526 online)
Rate this:
Please Sign up or sign in to 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 20-Mar-13 20:42pm
First, you did not define what is "reset" for a label. Then, why? Usually, labels never change; changing then confuses the user.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

try to use form name with label for ex Form1.Label1.Text=""
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
return this.labelX1.Text;
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100