private void showMainForm() { Properties.Settings.Default.Save(); mainForm form = new mainForm(); this.Hide(); form.Show(); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (Properties.Settings.Default.firstRun) { Application.Run(new chooseForm()); } else { mainForm form = new mainForm(); if (args.Contains("/background")) { form.ShowInTaskbar = false; form.WindowState = FormWindowState.Minimized; } Application.Run(form); } }