Answer the question
In order to leave comments, you need to log in
How to pass values from form1 to form2?
I'm struggling with passing values from Form1 to Form2, and then Form3.
I declared an array int Fleet[20][2]
after the line namespace Project {
. Then I change it in different classes.
After all the operations, I click on the button that runs the code.
MyForm_serv^ form = gcnew MyForm_serv();
form->Show();
this->Hide();
MyForm_serv
I want to pass the values from TextBox
to the form Form3
. Naturally, when the button is pressed, the code is executed.MyForm_play^ form = gcnew MyForm_play;
form->Show();
this->Hide();
Fleet[][]
which is in the first Form1 and the values from the TextBox located in Form2.
Answer the question
In order to leave comments, you need to log in
Make an array constructor in Form3 and pass the Fleet[][] array when creating the From3 form.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question