You can also use GetSystemMenu to get form's system menu handle and DeleteMenu to disable the button