>If the user press the X on the top-right windows, the release method doesn't fire. My forms have an exit button that execute thisform.release() to quit the form. I thought that the X would do the same ?
>
>Thanks
>Eric
Release is a method that releases the form from memory. It is not an event that occurs as part of a process. You have told the form to close as the result of you clicking on the close button (X). The form uses that mechanism to go away.
If you need stuff (CLeanup code) in the Release to fire everytime a form goes away, you could call the Release method of the form as David suggested or you could move that code to the Destroy event. This is executed everytime a form goes away, no matter how it was specifed.
Release - Destroy - Unload
QueryUnload - Destroy - Unload
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao