static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var main = new Home_Form(); main.FormClosed += new FormClosedEventHandler(FormClosed); main.Show(); Application.Run(); }