How to disable the closing cross


How to disable the closing cross


procedure TForm1.FormCreate(Sender: TObject); 
var 
  hMenuHandle : HMENU; 
begin 
  hMenuHandle := GetSystemMenu(Form1.Handle, FALSE); 
  if (hMenuHandle <> 0) then 
     DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND); 
end; 

You can also disable the follow:-

SC_MINIMIZE
SC_MAXIMIZE
SC_MOVE
SC_SIZE