SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Disable Close button on form caption

See this example. For enabling button use MF_ENABLED instead of MF_GRAYED.

procedure TForm1.Button1Click(Sender: TObject);
var
  Flag: UINT;
  AppSysMenu: THandle;
begin
  AppSysMenu:=GetSystemMenu(Handle,False);
  Flag:=MF_GRAYED;
  EnableMenuItem(AppSysMenu,SC_CLOSE,MF_BYCOMMAND or Flag);
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes