static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); //AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(ShowAssemblyLoad); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool noSplash = false; if (args.Length > 0) { foreach (string arg in args) { if (arg.ToLower() == "-nosplash") { noSplash = true; } } } if (noSplash) { Application.Run(new FormMain(args, null)); } else { FormSplash splash = new FormSplash(); splash.Show(); Application.Run(new FormMain(args, splash)); } }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); //AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(ShowAssemblyLoad); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormSplash splash = new FormSplash(); splash.Show(); Application.Run(new FormMain(args, splash)); //AppDomain.CurrentDomain.AssemblyLoad -= ShowAssemblyLoad; }