Exemplo n.º 1
0
 // A private entry point for the thread.
 private static void ShowForm()
 {
     ms_frmSplash = new SplashScreen();
     //ms_frmSplash.Owner = ms_ParentForm;
     Application.Run(ms_frmSplash);
     //ms_frmSplash.Show();
     //Application.DoEvents();
 }
Exemplo n.º 2
0
        // A static method to close the SplashScreen
        public static void CloseForm()
        {
            if( ms_frmSplash != null && ms_frmSplash.IsDisposed == false )
            {
                // Make it start going away.
                ms_frmSplash.m_dblOpacityIncrement = - ms_frmSplash.m_dblOpacityDecrement;
            }

            // SS: Ensure the correct main form comes to the fore when the splash screen
            // finally fades away. Do it here to avoid cross-threading error. I tried doing
            // this on creation of the instance, but for some reason, the splash screen
            // doesn't show up in that case. Doing it here just works.
            //ms_frmSplash.Owner = ms_ParentForm;

            ms_oThread = null;	// we don't need these any more.
            ms_frmSplash = null;
        }