How do I make a splash screen in my win form application?
There is no built-in support for the splash screen in the Microsoft.NET win form applications. However, you can create a splash screen by creating a form with no title bar (by setting its FormBorderStyle to None), making it not appear in the taskbar (by setting its ShowInTaskbar property to false), making it the top most form (by setting) its TopMost property to true, and making it appear on the center of the screen (by setting its StartupPosition as CenterScreen).
You can now show this splash form when the main application is loading.
C# Version
private void Form1_Load(object sender, System.EventArgs e)
{
this.Hide();
Form2 frmSplash = new Form2();
frmSplash.Show();
frmSplash.Update();
Thread.Sleep(5000);
frmSplash.Close();
this.Visible = true;
}
VB.NET Version
Private Sub Form1_Load(ByVal sender As System.Object, _
yVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
Dim frmSplash As New Form2
frmSplash.Show()
frmSplash.Update()
Thread.Sleep(5000)
frmSplash.Close()
Me.Visible = True
End Sub
Index