procedure ApplicationProcessMessages;
begin
 Application.ProcessMessages;
end;