Microsoft Visual C++ 2008
My Project contains one Form1 and one Unit (module) Test1.cpp.
There is the button1 on the Form1 which calls the function:
Test1::Change_Button_Text();
There is only one function in unit Test1.cpp
void Test1::Change_Button_Text()
{
// #1
Form1::button1->Text = "Hello forum!"; // isn't working :(
// #2
Form1 ^fr1 = gcnew Form1();
fr1->button1->Text = "Hello Forum!" // isn't working :(
}
What I want: Run the project, click the button and the button text will be changed to "Hello Forum!".
This is targeted to the following task: to find the way how to control Form properties (and Form component properties) from the other Units (Modules) of the Project (not only from the Form1.h).
I'm going to write a lot of procedures and do not want to place them in Form1.h header.
Thank you!