static void Main() { if (!SingleInstance.Start()) { SingleInstance.ShowFirstInstance(); return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { frm_menu mainForm = new frm_menu(); Application.Run(mainForm); } catch (Exception e) { MessageBox.Show(e.Message); } SingleInstance.Stop(); }