Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Periodical tasks in Delphi app
- repeat
- try
- Application.HandleMessage;
- except
- Application.HandleException(Application);
- end;
- until Terminated;//this is the Terminated property of the thread
- procedure PerformThreadLoop;
- var
- Msg: TMsg;
- begin
- repeat
- Try
- while PeekMessage(Msg, 0, 0, 0, PM_REMOVE) do begin
- TranslateMessage(Msg);
- DispatchMessage(Msg);
- end;
- WaitMessage;
- Except
- Application.HandleException(Self);
- End;
- until Terminated;//this is the Terminated property of the thread
- end;
Advertisement
Add Comment
Please, Sign In to add comment