Splash Screen - My Nemesis

Brady Kelly <[email protected]> Wed, 25 Jul 2007 21:39:28 +0200
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Organization Chase Software
Message-ID <[email protected]>
Yes, I've just spent hours trying various examples that don't work, and I've
just realised why people Callout actually _sell_ splash screen products.  My
biggest grip so far is that in the compiled app, not in the IDE, my main
window, from which I display my splash screen, always appears in the
background.



My code is outrageously simple, with no status updates or anything:



        public SearchGridForm()

        {

            InitializeComponent();

            splashScreen = new SplashScreen();

            splashThread = new Thread(new ThreadStart(ShowSplash));

            splashThread.Start();

        }



        private void ShowSplash()

        {

            splashScreen.ShowDialog();

        }



        private void SearchGrid_Load(object sender, EventArgs e)

        {

            try

            {

                Cursor = Cursors.WaitCursor;

                InitControls();

            }

            finally

            {

                Cursor = Cursors.Default;

                splashThread.Abort();

            }

        }