I must confess that I have never seen the logic in disabling the X. Put any cleanup code needed in either the form unload event or form terminate event depending on what you are trying to clean up.
The code will fire when the user clicks the X or whatever else you are using to close. (close button, code from another form etc, etc)
App works the way the user expects.
Please note, I do not wish to insult end users, but many have little concept of using an app. They expect things to work one way and get "upset" when things do not work that way.
Our job is to develop apps that they can and will use.
Terry (cyberbiker)