Einzelnen Beitrag anzeigen

Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#7

Re: Problem mit 2. Formular

  Alt 24. Jan 2006, 15:17
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.
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat