Windows Forms: Splash Screen in C#

This post shows you how to create a Splash Screen in c# .net windows forms application.

Creating the loading screen c# by using the SplashScreen library. So, to play the demo you should install the SplashScreen.dll by right-clicking on your project, then select Manage NuGet Packages -> Search 'splash screen' -> Install it on your project.

The SplashScreen library is an open source that help you create a simple splash screen in windows forms application.

Initializing your constructor as the following c# code that allows you to start a new thread to run the splash screen form.

public frmMain()
{
    Thread t = new Thread(new ThreadStart(Splash));
    t.Start();
    InitializeComponent();
    //Loading data
    string str = string.Empty;
    for (int i = 0; i < 100000; i++)
    {
        str += i.ToString();//Init data, only for demo
    }
    //Complete
    t.Abort();
}

You can use the loop to simulate data processing by delaying the process, then create the Splash method allows you to open the flash screen form as the following c# code.

void Splash()
{
    //Open a splash screen form
    SplashScreen.SplashForm frm = new SplashScreen.SplashForm();
    frm.Font = new Font("Time New Romans", 7);
    frm.AppName = "Demo";
    frm.Icon = Properties.Resources.app;//Load icon from resource
    frm.ShowIcon = true;
    frm.ShowInTaskbar = true;
    Application.Run(frm);
}

Through the c# example you can create a simple splash screen form that helps you loading screen c# windows forms application when you load or process data.

You can also add icon to the splash screen form or change the font type or font size to the loading screen.

VIDEO TUTORIAL