Link to home
Start Free TrialLog in
Avatar of MRManthani
MRManthani

asked on

Need to update textbox on the main form from another class

I have a windows application form which has a textbox. I need to update the textbox on the main form from another class.
If I have a  button and textbox.when I click the button, it creates an object of another class and calls the method of the class. Asthe method is running it is looping through rows. It sends a message as it completes each row. I want that message to be displayed in th textbox.
Do we need to use delegates??/
Can you please provide me a solution for this.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

You would need an instance of the main form, and then set the Modifiers to internal for the TextBox.
Avatar of MRManthani
MRManthani

ASKER

I have created instance of the main from.It is sending the messages.but the form gets frozen. I am not able to see it. it may be because the application is still running.
is there any way to see it updating when the application is running.
ASKER CERTIFIED SOLUTION
Avatar of Anurag Thakur
Anurag Thakur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you need to pass the string value which u need to update to the text box in the delegate and then use that in the main form