Screen saver example

I need a simple example of a Splash screen.

Get the code, paste my image, add 2 lines of code to download and complete.

But all I can do is so complicated, it's too much. I need a form with a picture, which becomes more transparent until it hides automatically and my window is displayed.

I tried "prettygoodsplashscreen" from Codeproject but it does not work for me.

Lang - C # .net 2.0

+4
c #
Mar 16 '10 at 15:31
source share
2 answers

Creating a splash screen can be as simple or complex as you make / want it.

private void Form1_Load(object sender, System.EventArgs e) { // Display the splash screen var splashScreen = new SplashForm(); splashScreen.Show() // On the splash screen now go and show loading messages splashScreen.lblStatus.Text = "Loading Clients..."; splashScreen.lblStatus.Refresh(); // Do the specific loading here for the status set above var clientList = _repository.LoadClients(); // Continue doing this above until you're done // Close the splash screen splashScreen.Close() } 

Obviously, the Splash Screen is what you need to decide how you want it to look ...

+10
Mar 16 '10 at 15:47
source share

In order for your splash screen to be an isolated pop-up screen, it should not have any code other than displaying what it is doing (for example, loading clients) or showing the progress of launching the application through the ProgressBar control.

Here are the steps:

  • Create a BackgroundWorker file for which you will start loading in the BackgroundWorker.DoWork () method;
  • As part of the main Form_Load () event, call the BackgroundWorker.RunWorkerAsync () method;
  • Still in your Form_Load () event, after calling RunWorkerAsync (), create an instance and show your splash screen to your user. SplashForm.ShowDialog ()
  • Report progress from your LoadClient () method, for example, using the BackgroundWorker.ProgressChanged () event (you can also tell what your BackgroundWorker is doing ("loading clients ...");
  • In your RunWorkerCompleted () event, you can use Splash.Close () your splash screen shape.

Further I will add additional details. Have to go now.

+2
Mar 16
source share



All Articles