I have a MainForm which has a Textbox and a Button in it. Then I have a second form with a single button. On program start, the MainForm is initialized and when I click the button, the second form shows up (ShowDialog()
) still keeping open the MainForm.
So I have these two forms opened next to each other. The thing I want is, that when I click the button, the button will send a string to the MainForm. MainForm will take the text and display it in it's textbox. But I want to make the change happen immediately - without hiding and showing the MainForm again. Sort of like refresh it, when the button on the second form is pressed.
How can I do that?
Note: It's important to have the text, which is send to the MainForm, have declared in the second form. (In my program, the text is dynamically being changed on the second form level)