Zneprístupnenie “Zatvoriť” v systémovom menu
Zneprístupnenie položky “Zatvoriť” v systémovom menu
var Flag : UINT; AppSysMenu : THandle; begin AppSysMenu := GetSystemMenu(Handle, False); Flag := MF_GRAYED // Set Flag to MF_ENABLED to re-enable it EnableMenuItem(AppSysMenu, SC_CLOSE,MF_BYCOMMAND or Flag); //Or if you prefer, the following code will delete / remove it completely {either DeleteMenu(AppSysMenu,5,MF_BYPOSITION); ALEBO DeleteMenu(AppSysMenu,SC_CLOSE,MF_BYCOMMAND);} {DrawMenuBar(AppSysMenu);} end;