Just wondering whats the big difference between Form.Closed and Form.FormClosed event in the order of events of Windows Application. I've read it in MSDN documentation but still couldn't find anything much different from one another. Please explain.
1 Answers
As MSDN says:
The
Closedevent is obsolete in the .NET Framework version 2.0; use theFormClosedevent instead.
I don't think you should even consider using this event. It's deprecated and hidden but it's there only for compatibility with old source code.
It has the same meaning of the FormClosed event but with one (not so much) subtle difference, as you can see on MSDN the Closed event isn't raised when application exists because of a call to Application.Exit() but the FormClosed is.
This behavior is also documented in the link above:
The
Form.ClosedandForm.Closingevents are not raised when theApplication.Exitmethod is called to exit your application. If you have validation code in either of these events that must be executed, you should call theForm.Closemethod for each open form individually before calling theExitmethod.