Parent/Child forms communication issue
- by user361583
Hi,
I am very new to Visual C++ programming, but I have to write simple program which needs to do two things: ( I am using MS Visual C++ )
main ( parent ) form should be displayed when program starts, and after clicking a button on it, second form should be shown.
Second form ( child ) also has a button, but this one should ( after clicking, of course ) show current X,Y child form position but on ( important ): parent form.
And this is where i got stuck.
I can display child form with:
a) adding #include "child.h" in parent form.h
b) adding child ^child_form; in public: section
and afterwards using:
child_form = gcnew child();
child_form-Show();
I was googling for two days now and cannot find a way to get it the other way: click on a button on child_form and display it's coordinates on parent form on label-text :/
when i tried to add #include "child.h" in child_form I just got error saying: "there are to many include files..."
I really need to get this done and I would really appreciate any suggestions.
Thanks in advance :)