Hey,
i have a CLR proyect where i have 2 forms, i am trying to acces the form1 class via form2.

what i did is that i included the header.h of the form in form.h but it failed so i went back and icluded thesame folder both of them are there and then it compiled fine.
then i tried to acces form1.h but it doesnt locate anything in the header so then i made a function in form1.h and not even that it wont located it wont locate.

Recommended Answers

All 3 Replies

Please post your code. Don't forget to push the code button before you paste each file.

Modify the constructor of form2 to take a form1 object. Assign that to a private form object in your form2. Operate on it like you would any other object.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.