Tag

disable

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

Disable Keyboard and Mouse

  • 14 December 2013
  • 253
  • keyboard,mouse,disable

simple code to manage disability keyboard and mouse   function FuncAvail (VLibraryname, VFunctionname: string; var VPointer: pointer): boolean; var Vlib: tHandle; begin Result := false; VPointer := NIL; if LoadLibrary(PChar(VLibraryname)) = 0 then exit; VPointer := GetModuleHandle(PChar(VLibraryname)); if Vlib 0 then begin VPointer := Read more


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


enable and disable system beep

  • 13 January 2014
  • 193
  • enable,disable,system beep

procedure TForm1.Button1Click(Sender: TObject); begin SystemParametersInfo(SPI_SETBEEP, 0, nil, SPIF_SENDWININICHANGE); end; // Enable System beep: procedure TForm1.Button2Click(Sender: TObject); begin SystemParametersInfo(SPI_SETBEEP, 1, nil, 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