By changing the setting in multiple forms. The set_window_property built-in doesn't have access to this property, AFAIK. You can size, position, color, and other things, but prevent closing by disabling the "X" (or its equivalent in UNIX), I am pretty sure, can't be done via code. You can try to capture the on-key event and do null.