Zitat von
Elvis:
Wenn du ein Form normal aufrufst, wird mit Close gleich ein Dispose ausgeführt.
Sozusagen ein sauberer Selbstmord
.
Zitat:
When a form is closed, all resources created within the object are closed and the form is disposed. You can prevent the closing of a form at run time by handling the Closing event and setting the Cancel property of the CancelEventArgs passed as a parameter to your event handler. If the form you are closing is the startup form of your application, your application ends.
The one condition when a form is not disposed on Close is when it is part of a multiple-document interface (
MDI) application, and the form is not visible. In this case, you will need to call Dispose manually to mark all of the form's controls for garbage collection.