I would like to update the form textboxin winforms with data that is processed from the class file.
Example:
Class.RunProcess();
Inside RunProcess, I would like to trigger an event that will update the text box with the text that I pass in the form of a win.
I know that you can do this with events, so I don’t need to publish public textboxor pass it to many methods that I have, I'm just not quite sure how to start.
Edit : Maybe I just don't understand.
I have a window shape with a text box on it.
I have a button that starts the process.
The process is in the class file outside the form class.
Inside this process method, I would like to be able to update the text field in the main form without passing the TextBox as a parameter to all the methods that I will have (currently I have 6 and there will be more).
I thought I could subscribe to an event that would allow me to display a message in a text box while processes were running in my class.
Computer girl
source
share