|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
User Control's Load event fires when the Dispose method executesinstantiated on a window form. When the windows form is closed via clicking on the top right red-X close button, the user control's Dispose method executes. When it executes the load event fires. Here's the dispose method: Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then 'WHEN THE NEXT LINE EXECUTES, the controls Load Event Fires. components.Dispose() End If End If MyBase.Dispose(disposing) End Sub This user control also created instances of some other user controls used as sub-forms. I don't know if this has anything to do with it, but when the user clicks on the red-X close button of the parent form and things began to close, no cleanup code ran to kill the instances of these user controls. I will eventually have the proper cleanup code in place, but right now I want to understand why this load event fires when "components.Dispose()" is called. Thanks. -- moondaddy@nospam.com
Other interesting topics
Hidding a window and preventing Alt-Tabbing to it
find process by processname Deployed simple C#.NET single form application to Windows server 2003 and the form will not display, How to simply load a freeekin bitmap from a resource? Closing all instances of an application DateTime Bound to TextBox Hello, Japan? Post-Mortem Debugging Creating VS Studio like control creating VS Studio like controls |
|||||||||||||||||||||||