Source Code



Disable the Close X button on a Form

  • anonymous
  • Feb 22' 14
  • Delphi
  • 170
  • 199
  • United States

Source code for hide close button from a from


procedure TFMain.FormCreate(Sender: TObject);
var
  hMenuHandle: Integer;
begin
  hMenuHandle := GetSystemMenu(Handle, False);
  if (hMenuHandle  0) then
    DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
  • Tags : disable, close, button
comments powered by Disqus

Related Code

enable and disable system beep

Disable Close button on form caption

Access the controls of a TRadioGroup

Disable Keyboard and Mouse



Category

Tag Linked