How to show a splash screen to kill the time while data is loaded?

Kai picture Kai · Aug 20, 2009 · Viewed 7.1k times · Source

When starting my app I at first have to read in some data, have to init some forms and so on. For that time the user sees just grey getting-ready to show something forms.

This lasts for a few seconds...

I thought of a Splash Screen that loads the data in a seperate Thread and also shows how long it will take. Or just a status bar?

How would you do something like this?

I'm using C# .NET 3.5 + Winforms

Answer

RichieHindle picture RichieHindle · Aug 20, 2009

See this CodeProject article: A Pretty Good Splash Screen in C#

It implements a splash screen that:

  • Runs on a separate thread
  • Fades in as it appears, and fade out as it disappears
  • Displays a running status message that is updated using a static method
  • Displays and update a predictive self-calibrating owner-drawn smooth-gradient progress bar
  • Displays the number of seconds remaining before load is complete

Here's an example of what it looks like - maybe yours will be prettier. 8-)

alt text