I want to show a splash screen while my application's main form is loading and the splash form should disappear without me having to build in timers etc. Another important thing is that the main form should be the one determining when the application exits, when I use my splash form to start the application and then use it to open my main form I cannot dispose the splash screen, since that will kill the application.
using Microsoft.VisualBasic.ApplicationServices;
public class Startup : WindowsFormsApplicationBase
{
protected override void OnCreateSplashScreen()
{
SplashScreen = new SplashForm();
}
protected override void OnCreateMainForm()
{
MainForm = new MyMainForm();
}
}
static class Program
{
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
new Startup().Run(args);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With