Make a Splash screen in C#
In this tutorial we will see how to make a Splash screen in C# Windows Form Application.
First add a Windows Form to your application and name it SplashScreen and set its FormBorderStyle property to None, then add a PictureBox and make its size the same as the SplashScreen Windows Form and load your Image to this PictureBox:
In Program.cs , modify the Main void:
Watch the video below for more details:
First add a Windows Form to your application and name it SplashScreen and set its FormBorderStyle property to None, then add a PictureBox and make its size the same as the SplashScreen Windows Form and load your Image to this PictureBox:
In Program.cs , modify the Main void:
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
SplashScreen f = new SplashScreen();
f.Shown += new EventHandler((o, e) =>
{
System.Threading.Thread t = new System.Threading.Thread(() =>
{
System.Threading.Thread.Sleep(2500);
f.Invoke(new Action(()=>{f.Close();}));
});
t.IsBackground = true;
t.Start();
});
Application.Run(f);
Application.Run(new Form1());
}
Watch the video below for more details:
Make a Splash screen in C#
Reviewed by Bloggeur DZ
on
02:21
Rating:
Aucun commentaire: