David -
I forgot to tell you something else important: The reason that the form does not close when the user tries closing with one of the title bar close methods is because of code I have in the VALID method of a TextBox control on the form. I will explain. There is a "Cancel" button on the form. If the user clicks that button, I do not want data in the TextBox control to be validated and, if incorrect, prevent the form's focus from leaving that TextBox. Hence, in the VALID method I have placed code that checks whether the point on the form where the user clicked is contained within the form coordinates of the "Cancel" button. If the point clicked is not part of the "Cancel" button, and the TextBox data is invalid, then the focus remains in the TextBox.
I need some way of also capturing the title bar close option selections so that I can include additional code in the TextBox VALID method to test for those selections and allow the focus of the form to leave that control and allow the form to close.
Thank you again for your help!!!
Brent Hackett
Deseret Trust Company
801.433.1513
hackettbl@deserettrust.com
Brent L. Hackett