There are 2 forms (MyForm and MyForm 1), it is necessary that after clicking on the button (go to) the second form opens.

if (Login == RL && Password == RP) { MyForm1->Show(); MessageBox::Show("Login and Password is right!", "Your AUTH"); } else { MessageBox::Show("Login or Password is WRONG!", "Your AUTH"); } } 

The problem is that when I add code to MyForm1->Show(); then I get an error (id required)

    1 answer 1

    I solved the problem by adding the lines #include "MyForm1.h" and replacing MyForm1->Show(); on :

     MyForm1^ frm = gcnew MyForm1; frm->Show(this);