Hello. I've got a problem that I haven't been able to solve after a long time searching.
It's a simple problem. I have two forms.
1) Form1
2) Form2
I need to get from Form1 to Form2 and vice versa.
I can get from Form1 to Form2 easily, but I can't get back from Form2 to Form1.
I have the #include "Form2.h" on Form1.h and the following code in the click event of button1.
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Form1::Visible=false;
Form2 ^form2 = gcnew Form2();
form2->ShowDialog();
}
Does anyone know how to solve this? Thanks.