How to create a splash screen in a Windows Forms application without setting timers, etc.?

I want to show a splash screen when my main form of the application loads and the splash form should disappear without the need to create timers, etc. Another important thing is that the main form should be the one that is defined when the application exits, when I use my splash form to launch the application, and then use it to open my main form, I can’t set a splash screen, so how it will kill the application.

+3
c # winforms splash-screen
Nov 01 2018-11-11T00:
source share
1 answer
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); } } 
+6
Nov 01 '11 at 6:44
source share



All Articles