Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

interactive services 1

Status
Not open for further replies.

zildjohn01

Programmer
Sep 6, 2005
10
US
hi, i have a question about .net services.

i would like to create a service that creates a tray icon and a window on the current desktop. When a new user logs on or the desktop is switched, i would like to be notified, then move my tray icon and form to the new active desktop.

I read about interactive services on msdn, but didn't see anything about tray icons. Could tray icons be managed in a service? Is there a way to get notifications of user changes?

Thx in advance for any help,
John
 
Services, by their nature, don't interact with the desktop. This is because they run when Windows starts, and not when any user logs in.

What you can do is write a service to do "the real work", and then write a tray icon application that communicates with the service via one of the inter-process communications methods (sockets, named pipes, etc), and have the tray icon in the user's startup group.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
thanks -- what would really be nice for my app though is to have a global keyhook (such as ctrl+alt+shift+s) to halt (cleanly) my service, even if a user is not logged in. if that is not possible, though, what you described will work fine. thanx so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top