static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormLogin fl = new FormLogin(); fl.ShowDialog(); if (fl.DialogResult == DialogResult.Cancel) { Application.Run(new FormMain()); } else { return; } }
private void FormMain_Load(object sender, EventArgs e) { FormLogin formlogin = new FormLogin(); }