You show the second form using the method
ShowDialog()
, this call show the form and doesn't return until the form is closed. Then to show again the main form, you have to just add
this->Show()
on the line below:
weatherfrm^ weather = gcnew weatherfrm();
this->Hide();
weather->ShowDialog();
this->Show();