2 минуты на поиск решения в Гугле:
Код:
procedure BlockInput(ABlockInput : boolean); stdcall; external 'USER32.DLL';
...
procedure TForm1.Button1Click(Sender: TObject);
begin
BlockInput(True);
Sleep(5000);
BlockInput(False);
end;
For more
Win32 Programmer's Reference
PS. Не проверял.