>>51020002I've given this answer out before, but here, i'm feeling generous today.
use GetSystemMenu to find the unique identifier of the system controls associated with that program's window. Write it into a variable like $menu
then,
DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_MOVE, "int", 0x0)
DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_SIZE, "int", 0x0)
DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_CLOSE, "int", 0x0)
DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_MINIMIZE, "int", 0x0)
DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", $SC_MAXIMIZE, "int", 0x0)
That should make a totally unresponsive locked-down window suitable for the most gestapo software. Be aware this upsets some users when they feel trapped, I would only do this to a small window during a critical install process like a driver.
Make sure you use DrawMenuBar with the Hwnd ID of the window afterwards so that windows redraws it.