#define SC_CLOSE 0xF060 #define MF_BYCOMMAND 0x00000000 DECLARE Long GetSystemMenu IN WIN32API ; Long hWnd, Long bRevert DECLARE Long RemoveMenu IN WIN32API ; Long hMenu, Long uPosition, Long uFlags * disable close button hMenu = GetSystemMenu(_VFP.hWnd, 0) RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND) * enable close button hMenu = GetSystemMenu(_VFP.hWnd, 1)