no matter what I tried, Visual Studio doesn't stop debugging even after closing the form.
using System;
using System.Windows.Forms;
namespace Database_Form
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
Application.Run(new LPEE());
}
static void Application_ApplicationExit(object sender, EventArgs e)
{
// Close all open forms
foreach (Form form in Application.OpenForms)
{
form.Close();
}
}
}
}
this is what I found online and wrote it in Program.cs, but it didn't work