System Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
Handle: THandle;
begin
Handle := GetSystemMenu(Self.Handle, False);
RemoveMenu(Handle, 1, MF_BYPOSITION);
RemoveMenu(Handle, 2, MF_BYPOSITION);
end;