Is there an alternative to application.processmessages in a service? i
need some message queues processed as im waiting for a result so in a
normal app id do
while (condition) do
application.processmessages;
but the application variable in a service is of type tserviceapplication
which doesn't have the processmessages procedure.
procedure TService1.ProcessMessages;
var
Msg: TMsg;
begin
if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
Is there an alternative to application.processmessages in a service? i
need some message queues processed as im waiting for a result so in a
normal app id do
while (condition) do
application.processmessages;
but the application variable in a service is of type tserviceapplication
which doesn't have the processmessages procedure.
Thanks - works perfectly; just do the normal message loop stuff.
J
Ben Cameron wrote:
>
>
> Hi,
>
> try this,
>
> procedure TService1.ProcessMessages;
> var
> Msg: TMsg;
> begin
> if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then
> begin
> TranslateMessage(Msg);
> DispatchMessage(Msg);
> end;
> end;
>
> Ben
>
> -----Original Message-----
> From: delphi-enyahoogroups.com <mailto:delphi-en%40yahoogroups.com>
> [mailto:delphi-enyahoogroups.com <mailto:delphi-en%40yahoogroups.com>]On
> Behalf Of Jangita
> Sent: 23 June 2006 11:32
> To: delphi-enyahoogroups.com <mailto:delphi-en%40yahoogroups.com>
> Subject: [delphi-en] Application.Processmessages in a service
>
> Hi all
>
> Is there an alternative to application.processmessages in a service? i
> need some message queues processed as im waiting for a result so in a
> normal app id do
>
> while (condition) do
> application.processmessages;
>
> but the application variable in a service is of type tserviceapplication > which doesn't have the processmessages procedure.
>
> any ideas?
>
> j
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> <http://groups.yahoo.com/group/delphi-en/>
> To unsubscribe: delphi-en-unsubscribeyahoogroups.com
> <mailto:delphi-en-unsubscribe%40yahoogroups.com>
> Yahoo! Groups Links
>
>