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.
As MSDN says:
The
Closed
event is obsolete in the .NET Framework version 2.0; use theFormClosed
event 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.Closed
andForm.Closing
events are not raised when theApplication.Exit
method is called to exit your application. If you have validation code in either of these events that must be executed, you should call theForm.Close
method for each open form individually before calling theExit
method.