Pass value from Form3 to Form2
There is one function that I really need to know and understand how to do.
The example is that I have is a form application with 3 Forms.
Form1 is the starting form.
What I need to do now is to pass a value from Form3 to Form2 and
let Form2 Show a message with this "String".
RealExample would be:
Form3:
Code:
String^ PassThisString = "PassThisToForm2";
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e)
{
//Pass, PassThisString to Form2 ?
this->Close(); //After passing, close Form3
}
Now, the PassThisString will be send to Form2 and showed in a ex: MessageBox like:
Code:
MessageBox::Show(PassThisString)
I have been wondering for a long time how you can do this the easiest way but never got a good answer on this.
I have always been working within the form where I know how to call GlobalVariables and button, events.
Thank you in advance