C# where to attach Application.ApplicationExit Event

  • Thread starter Thread starter antidinosaur
  • Start date Start date
A

antidinosaur

Guest
I am writing an app that enter through a main class where the UI form is loaded (I kept the console for debug). In my UI form, I will generate some files. I used form. closing event to delete the files. This works fine if I close the form with the UI on the form. However, if during debug, I use the stop button to exit. Those files will not be delete. I search the MSDN and find ApplicationExit event. However, I could not understand where I should put the Event code and how I attached the Event. Should it be put in the UI form codes or in the main class code? Where should I attach the Event?

Continue reading...
 
Back
Top