I am making a windows form application and in the main loop of the source file I have:
int main() {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
UserInterface form;
Application::Run(%form);
//this just changes the text on one of the buttons in the windows form
form.button->Text = L"Test";
}
and after line 5 where is says Application::Run(%form) it wont run anything after that. The line where I tell it to change the text on the button wont work, and it doesnt get executed. Why is this? Is it because the computer focuses on the form header file and not the main loop? Please help!
Application::Run will end when you close the form. You can set the text of your button either in the constructor of the form or in the load event or at design time in the property inspector.