Hello Wilfried,

Many thanks for the tip.

Windows XP and 2000 support multiple users, each with
a different desktop. I'm not sure how FindWindow() works
in this scenario. I remember a NT service is not in the
same WindowStation as any user desktop.

I tried your svc sample. When I have two users logged on
Win XP with Fast User Switching, the service shows a tray
icon in one of the user's desktop but not the other one.
I think the reason is what I just mentioned in the previous
paragraph.

-- 
Best regards,
Jack

Saturday, August 27, 2005, 6:21:36 AM, you wrote:

> Hello Jack,

> What I do is at regulary intervals (30 seconds) check if the taksbar is
> there: FindWindow('Shell_TrayWnd', nil);
> If it is then destroy the timer and create the trayicon. Also when User
> log's off the way around.

> You find an example on my site together with a little class to create an
> NT Service from a normal GUI exe (same *.exe can run as service and as
> normal GUI, very easy for debugging and other purposes).

> ---
> Rgds, Wilfried
> http://www.mestdagh.biz

__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to