Tray icon etc. not showing when started by Service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have an control app which starts up with a small info message then sits
down as a tray icon while it does its work. When started manually (e.g.from a
shortcut) this always works fine. However the app is designed to start
automatically (via a windows service) whoever is logged on. Sometimes, when
started by the service, neither the info message nor the tray icon appear.
The app is working fine in the background, but without the tray icon users
can't make adjustments to the app.
Why should the app behave differently in this way?
 
quilkin said:
Hi
I have an control app which starts up with a small info message then sits
down as a tray icon while it does its work. When started manually (e.g.from a
shortcut) this always works fine. However the app is designed to start
automatically (via a windows service) whoever is logged on. Sometimes, when
started by the service, neither the info message nor the tray icon appear.
The app is working fine in the background, but without the tray icon users
can't make adjustments to the app.
Why should the app behave differently in this way?

Are you handling the proper user logon events and registering your icon at that
time, or just during your startup (when no user is logged on)?
 
Julie

I'm not handling lgone events (is there an evenmt handler for this - what's
it called?) but after doing some tests this seems not to be the problem. In
fact every time the system starts from a reboot (even if nobody logs on for
several minutes) the icon appears.
It's most likely not to appear when the app is stopped then restarted by
stopping and then restarting the control service, with the same user logged
on throughout.
Although this is not a likely sequence to manually go through, it is in
effect what happens if the main app freezes and the control app then does its
job of restarting the main app.
 
Back
Top