program Project1;uses Windows, Messages;procedure Timer;begin MessageBeep(MB_OK);end;var Msg : TMsg;begin SetTimer(0, 0, 2000, @Timer); while GetMessage(Msg, 0, 0, 0) do begin TranslateMessage(Msg); DispatchMessage(Msg); end;end.