G
Guest
Hi all,
I have just started working on VC++ .Net and have problem with circular
dependencies of 2 files.
I created 2 forms "Form1" and "Form2", which respectively created 2 .h
files, Form1.h and Form2.h and so as 2 classes, "Form1" and "Form2".
Now I want to use object of Form1 inside Form2 and object of Form2 in Form1.
Reason:
1) I want to open Form2 from Form1 when a button is clicked
2) Want to access some public variable in Form1 from Form2.
I all the time get compiling error stating that Form1 is not declared even
if I have included "form1.h" and "form2.h" in "form2.h" and "form1.h",
respectively.
May I know how to solve this problem.
Your help will be appreciated.
Thanks
I have just started working on VC++ .Net and have problem with circular
dependencies of 2 files.
I created 2 forms "Form1" and "Form2", which respectively created 2 .h
files, Form1.h and Form2.h and so as 2 classes, "Form1" and "Form2".
Now I want to use object of Form1 inside Form2 and object of Form2 in Form1.
Reason:
1) I want to open Form2 from Form1 when a button is clicked
2) Want to access some public variable in Form1 from Form2.
I all the time get compiling error stating that Form1 is not declared even
if I have included "form1.h" and "form2.h" in "form2.h" and "form1.h",
respectively.
May I know how to solve this problem.
Your help will be appreciated.
Thanks