In order to show a first run dialog (a window that appears before the main application starts if certain conditions are met) I have decided to modify the Main method and do this:
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (Properties.Settings.Default.FirstRun)
{
Application.Run(new RunOnce());
}
Application.Run(new Main());
}
Is this a bad idea? It works, and with a bit of additional logic I can prevent the main application from even opening should the user cancel out of the first run dialog.
Thoughts?