common variables
-
i am trying to create an application whis has one more forms and i have problem, how can i declare a variable, which can be reached and changed by different form controls(not the same time)? i mean one of forms change the value of variale and the other form reach it create a process dependent this variable.
--always comes daylight after night-----
-
i am trying to create an application whis has one more forms and i have problem, how can i declare a variable, which can be reached and changed by different form controls(not the same time)? i mean one of forms change the value of variale and the other form reach it create a process dependent this variable.
--always comes daylight after night-----
create a public property in a form and by setting its property you can change the value //declaring property in CForm1 private: int abc; public : property int ABC { int get() { return abc; } void set(int value) { abc = value; } } // using property in CForm2 #include "Form1.h" CForm1^ frm = gcnew CForm1(); frm->ABC = 123;
Nigah M Manzoor