Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change duration of splash screen?

I recently added a splash screen to my WPF app.My app loads fast so the screen is only on for milliseconds.How would i lengthen the time my splash screen stays up.I would like it to be two seconds.

like image 840
deception1 Avatar asked May 04 '12 05:05

deception1


People also ask

How do I set the time on my splash screen?

Time interval settings The splash screen will be displayed for a specific time period and will then be closed. By default, the value will be set as 5000. User can change this value, run the application and see the difference. The time interval for which the splash screen is to be displayed (in milliseconds).

How long should a splash screen last?

Duration: We recommend not exceeding 1,000 ms on phones. You can use a delayed start, but this can't be longer than 166 ms. If the app startup time is longer than 1,000 ms, consider a looping animation.

How long is the unity splash screen?

The entire duration of the Splash Screen is the total of all logos plus 0.5 seconds for fading out. This might be longer if the first Scene is not ready to play, in which case the Splash Screen shows only the background image or color and then fades out when the first Scene is ready to play.

How do I change the splash screen in Visual Studio?

Create and Customize Splash Screen at Design TimeDrop the SplashScreenManager component onto the form. Right click the component in the Visual Studio tray and select Add Splash Screen . The SplashScreenManager adds a new SplashScreen form to your project. Double-click the SplashScreen1.


2 Answers

If you trigger the splash screen to show in the Application.Startup Event you will have full control over it. (be sure to call .Show() with false)

private void Application_Startup(object sender, StartupEventArgs e)
{
   SplashScreen screen = new SplashScreen("splashScreen.png");
   screen.Show(false);
}

Then you can call screen.Close() when you would like the splash screen to close.

like image 152
Rob Avatar answered Sep 28 '22 14:09

Rob


You can also call System.Threading.Thread.Sleep() before the InitializeComponent in the main window. this works.

something like that:

 public MainWindow()
    {
        System.Threading.Thread.Sleep(2000);
        InitializeComponent();}
like image 33
Waleed Mohamed Avatar answered Sep 28 '22 15:09

Waleed Mohamed