I have an app with a timer that won't allow the user to close it until the timer has finished. (when the countdown is over, a command button becomes enabled to close the form).

But how can I disable the close (x) in the top right hand corner whilst keeping the rest of the toolbar?

I've tried the code in KB article Q110393 but it doesn't work.

Any ideas?

Simon