I'm sure I could have answered this myself a while ago but having been away from DBP for 2 years I am a bit rusty.
I have created a software tool and I want to be able to write to a file when the user exits so that I can store the positions of windows, panels etc.
If the user selects File->Exit then I can do what I want.
I know I can also disable the escape key then react when the user presses the escape key.
However, if the user clicks the close button there is nothing I can do about it.
I know I could get around the issue completely by making the software full screen but I would really rather keep it windowed.
Any suggestions?