Fumetsu
Fumetsu
CC#
Created by Fumetsu on 4/24/2025 in #help
Handle Closing Form?
Hello, I'm having some trouble handling the closing of my form. Currently I'm using the method below, but it for some reason runs 5 times instead of just once.
private bool Closing = false;
Classes Classes = new Classes();

public MainForm()
{
InitializeComponent();
Application.ApplicationExit += new EventHandler(this.Application_ApplicationExit);
}


private void Application_ApplicationExit(object? sender, EventArgs e)
{
Classes.Spark.DebugLog("The app is currently being closed!");
}
private bool Closing = false;
Classes Classes = new Classes();

public MainForm()
{
InitializeComponent();
Application.ApplicationExit += new EventHandler(this.Application_ApplicationExit);
}


private void Application_ApplicationExit(object? sender, EventArgs e)
{
Classes.Spark.DebugLog("The app is currently being closed!");
}
8 replies