Is there any way to securely stick a notebook window (e.g. a dialog) on screen that it cannot be closed/removed/hidden by any of the standard OS shortcuts, like AltF4 or AltTab under Windows? The ideal solution would allow me to specify a range of key-combinations that can be used, and block any other, though it would not be a problem to block all keyboard input, as there are other ways to close a modal dialog.
I have a feeling that this cannot be done entirely from under Mathematica, though I'll give it a go. You can experiment with the following example:
CreateDialog[{TextCell["Click OK to close"], DefaultButton[]}, Modal -> True]
Purpose: I'm doing some experimentation on humans in Mathematica, and since this species is known by its extensive explorative behaviour (i.e. pushing all buttons) and the ability to ruin everything, I want to make the experiment-gui foolproof so that they can't remove it from the screen. This is a must, as it could happen that they hit AltF4 (accidentally or intentionally) and quit at the middle of a test, rendering any saved data useless.
WindowFrameElements -> {}doesn't prevent Alt-F4 from working. – Szabolcs Apr 19 '12 at 15:14WindowFrameElements -> {}does preventCmd-wfrom closing the notebook on OS X. – Heike Apr 19 '12 at 15:34Alt-F4– Eli Lansey Apr 19 '12 at 15:41Ctrl-W, but notAlt-F4. – Szabolcs Apr 19 '12 at 15:52Alt-F4equivalent apart fromCmd-Wand possiblyCmd-H(which hides all windows of the active application (at least on 10.6)) – Heike Apr 19 '12 at 15:55