Accessing UI Elements From Global Declared Function

  • Thread starter Thread starter R. Irudezu
  • Start date Start date
R

R. Irudezu

Guest
I have some functions and i declared them outta public ref class Main : public System::Windows::Forms::Form

I can't reach UI elements in these functions because of scope. Anyone know how can i access them?

When i try to create an object in function like that:


void globalDeclaredFunc()

{

Main^ test = gcnew Main();
test->richTextBox1->AppendText("test");
//richTextBox1 member is inaccessible error

}

Continue reading...
 
Back
Top