How to add Splash Screen to Windows App in VS10 C#

splash screen-techopinion

Splash Screen is basically the first thing you see when you open any application. Primary goal of this Screen is to tell the user that application is loading and user needs to wait.

Here is the step by step guide to add Splash Screen to Windows Forms Application using programming language C#.

  • Step 1: Create a new Windows Form Application.

    • Open Visual Studio 2010
    • Go to File -> New -> Project
    • Select Windows Form Application under c# category

Splash Screen-techopinion

  • And name it as SplashScreenTry as shown below:

Splash Screen-techopinion

  • Step 2: Create a First Form of the Application to be displayed

    • Here we will use an inbuilt form created by Windows Forms Application, Form1.cs.
    • Put a label on this form by drag and dropping from Toolbox.
    • Write some text to be displayed as shown below. Ex. ‘Inventory System Application’ in our case.

Splash Screen-techopinion

  • Step 3: Create a Splash Screen Form

    • Add new form to act as splash screen by right clicking on project name(SplashScreenTry) in Solution Explorer.
    • Select Add -> Windows Form.

Splash Screen-techopinion

  •   Name it as SplashScreen.cs

Splash Screen-techopinion

  • Step 4: Edit a Splash Screen Form

    • Right click on Splash Screen Form design and select Properties
    • Change the following properties:
      • FormBorderStyle -> None
      • BackColor -> Select any color OR
      • You can also keep Background Image as splash screen by changing BackgroundImage property of a form.
      • StartPosition -> CentreScreen
    • Design a splash screen by using Text, Images etc. Usually splash screen contains the title of the Application, Version details, Owner and Developer information etc.
    • Here is the splash screen we designed:

Splash Screen-techopinion

  • Step 5: Set this Splash Screen as Start Form

    • Go to the Program.cs file
    • Replace Application.Run(new Form1()) by Application.Run(new SplashScreen())
  • Step 6: Set the timer for a Splash Screen.

    • Right click on the SplashScreen form design and go to events

Splash Screen-techopinion

  • Double click on the Shown event of the form and paste this code under that.

    private void splash_Shown(object sender, EventArgs e)
    {
    tmr = new Timer();
    //set the timer for splash screenas 4 sec
    tmr.Interval = 4000;
    //to start the timer
    tmr.Start();
    tmr.Tick += tmr_Tick;
    }


  • Then on the same code page, paste this code  outside the splash_Shown event code given above:

  • Timer tmr;
    void tmr_Tick(object sender, EventArgs e)
    {
    //after 4 sec we stop the timer
    tmr.Stop();
    //display first form of the application
    var nextform = new Form1();
    nextform.Show();
    this.Hide();
    this.Hide();
    }


  • Here Form1 is the next form to be displayed after 4 seconds of splash screen.
  • Finally Save and run the application.

You may also like Install Turbo C++ for Windows and Linux

mm

About Sunayana Gawde

Sunayana Gawde is Chief Operations Officer at TechNirmiti Solutions and the Author at TechOpinion. She is a researcher in the field of Computer Science and Technology. She loves to write about Technology. You can connect with her on LinkedIn and follow her on Twitter.

36 thoughts on “How to add Splash Screen to Windows App in VS10 C#”

  1. I simply could not depart your web site before suggesting that I actually enjoyed the standard information a person supply to your
    guests? Is gonna be back often to investigate cross-check new posts

  2. fantastic submit, very informative. I wonder why the other specialists of this sector don’t realize this.
    You must continue your writing. I am confident, you have a huge
    readers’ base already!

  3. Ahaa, its nice dialogue on the topic of this post here
    at this webpage, I have read all that, so
    now me also commenting at this place.

  4. Fantastic web site. A lot of helpful information here. I am sending it to a few friends ans additionally sharing in delicious. And of course, thanks in your sweat!

  5. I’d need to seek advice from you here. Which is not something I usually do! I love reading an article that will make people feel. Also, many thanks permitting me to comment!

  6. I am typically to blogging and that i genuinely appreciate your posts. This article has really peaks my interest. Let me bookmark your web site and maintain checking for first time details.

  7. I’m very happy to read this. This is the kind of manual that needs to be given and not the accidental misinformation that’s at the other blogs. Appreciate your sharing this best doc. Pristina Travel

  8. This may be the correct blog for everyone who wishes to learn about this topic. You recognize a whole lot its virtually tough to argue along with you (not that I personally would want…HaHa). You actually put a new spin over a topic thats been revealed for many years. Wonderful stuff, just fantastic!

  9. Quality content is the important to interest the visitors to visit the website, that’s what this web
    site is providing.

  10. Hello there! I simply want to offer you a huge thumbs
    up for your great info you have right here on this post. I will
    be coming back to your site for more soon.

  11. Its ѕucһ as you learn my mind! You seеm
    to ɡrasp a ⅼot about this, like үoս wrote the ebook in it օr something.
    I think that you could do with some % to powеr the meѕsage house a lіttle bit, but instead of that, this is wonderful blog.
    An ᥱxcellent read. I’ⅼl definitely be back.

  12. Thanks for such an outstanding blog. Where else could anyone obtain that kind of info written in such a perfect way?
    I have a presentation that i’m presently working on, and I happen to be looking for such information.Thank you for
    blogging and i like your posts.

  13. I thiink thе admin օf thiѕ website iss іn fact
    workig hwrd iin favor ߋf his web pagе, as herе
    eѵery data іs quality based material.

  14. Greᥱtings! Ꮩery helpful advice ᴡithin this post!
    It’ѕ thee littⅼe changeѕ that mɑke tɦe grеatest changes.
    Thanks for sharing!

  15. I like the valuable information you supply on your articles.

    I will bookmark your weblog and check again here regularly.

    I am moderately sure I will learn a lot of new stuff proper here!
    Best of luck for the next!

Leave a Reply

Your email address will not be published. Required fields are marked *