Tag

close

  • Total Source Code 2
  • Total Page : 1
  • You currently on page number : 1

Disable Close button on form caption

  • 10 January 2014
  • 192
  • disable,close,button

//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 Read more


Disable the Close X button on a Form

  • 22 February 2014
  • 169
  • disable,close,button

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, Read more




Category