There are two forms: one - the main work area, the second - splash screen. The code is as follows (main functions: timer and constructor of the main form):
Main form constructor:
this->Hide(); SimpleReplacment::SplashScreen^ splashScreen = gcnew SimpleReplacment::SplashScreen(); splashScreen->Show(); if (splashScreen->Opacity <= 0) { delete splashScreen; this->Show(); } Timer splash screen:
this->Opacity -= 0.05; if (this->Opacity <= 0) { timer_loading->Enabled = false; this->Enabled = false; this->Close(); } The problem is that when loading the main form, it appears immediately, because the condition is one-time, but if I loop over the code block with the condition, then the code of the side form will not be executed. What should be done?