C# Refresh Underlying form data

I am working on a C# winforms application.

I have Form1 and Form2.

On Form1, I have Label1.  I open Form2 by clicking on a button on Form1 (Form1 remains open as well).

When I close Form2, or perform another method on Form2, I would like to refresh the text in Form1.Label1.

Can anyone help me with the code to do this.

Thanks.
jamesdean666Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anurag ThakurTechnical ManagerCommented:
you need to implement delegate and event in this case
in form2 closing event you will raise an event which will be handled by a hanlder for the event and delegate in form1
please go through the following link as its implemeting something similar to your requirements
http://www.experts-exchange.com/Programming/Languages/.NET/Q_23671134.html
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CSharp/Q_23736959.html
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CSharp/Q_23795439.html

all the links have my reference in them :)
Cheers - Ragi
0
klace06Commented:
hi suggestion why dont u use events when u close form 2 fire an event which is handled in form1
when the event is fired , the event handler will have code to change the label1's text
0
klace06Commented:
you dont need delegates only if u are passing event values can be done without delegates
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

jamesdean666Author Commented:
I am still struggling with this.. Can you please provide some code?
0
Anurag ThakurTechnical ManagerCommented:
the code pieces are provided in all the 3 links i have pasted
and i know that they are working
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
klace06Commented:
can you post the code snippet that you have and i can modify it to work
0
jamesdean666Author Commented:
Thnx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.