Taking variables from other forms? VIS C++

When i try to #include "MyForm" when MyForm has #include "MyForm1" it comes up with a list of erros, yet when only 1 of the 2 has the other included there is no errors, so how would i get a system string or input from a text box to a different form
EG:
User inputs the word Hello into a text box on MyForm, MyForm then closes and opens a new form that now has a label that writes "You typed Hello"? I don't know if i'd need to put the text box into a variable and get the variable over or what but i can't find a way i'd do so
it comes up with a list of erros, yet when only 1 of the 2 has the other included there is no errors


Could you post the errors and/or the code here? It's hard to tell what's wrong without knowing the context.

Visual C++

This is actually the IDE (i.e: Visual Studio), not the language, I think you want to say Managed C++ (using CLI).
Last edited on
I'm not currently at my main computer with the code and such so no but i do have the errors some what of memorized
When ever MyForm1 has include MyForm while MyForm has include MyForm1 it starts saying MyForm1 is an undeclared identifier and the stuff to open a new forum starts turning into errors
When ever MyForm1 has include MyForm while MyForm has include MyForm1
You can't have this circular include dependency. Instead of including each other you need is forward reference. See:

http://stackoverflow.com/questions/326205/what-is-forward-reference-in-c#326214
Topic archived. No new replies allowed.