associate the onclose methods to the events of the forms