+ Reply to Thread
Results 1 to 2 of 2

Thread: splash screen with timer

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    10

    splash screen with timer

    I want to display a splash screen for a short period : 5 seconds , i tried that code :
    Code:
    SplashScreen splash = new SplashScreen("/Images/splash.png");
    splash.Show(true);
    But the problem is that the application continue to work and evade the splash like it doesn`t exist.
    I want to pause the program for 5 seconds to display the splash screen then continue working.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    35
    I got two solutions for you here :
    You can either pause the application by using thread.sleep or fade out the splash over a period of time .

    Pause the application using Thread.Sleep :
    Code:
        SplashScreen splash = new SplashScreen("/Images/Agrar.png");
        splash.Show(false);
        Thread.Sleep(5000);
    Fade out the splash :
    Code:
    splash.Close( TimeSpan.FromSeconds(10)); //fade out over 10 seconds

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts