Search code examples
visual-studiowinformsc++-cli

How do you implement a C++/CLI splash screen?


I'm trying to make an application using C++/CLI and being new, I found out that there's not much of an article about C++/CLI splash screens. Question is, how do you make/implement a splash screen in your C++/CLI code?


Solution

  • You could try the following code to implement splash screen in c++/cli.

    Mainform:

    public:
            MyForm(void)
            {
                Thread^ t = gcnew Thread(gcnew ThreadStart(this,&MyForm::StartForm));
                t->Start();
                Thread::Sleep(5000);
                InitializeComponent();
                t->Abort();
                
            
            }
        public:void StartForm()
        {
            Project1::SplashScreen form;
            Application::Run(% form);
        }
    

    Result:

    enter image description here