Icon in tray with Windows Service

  • Thread starter Thread starter Clay Wilcox
  • Start date Start date
C

Clay Wilcox

How can i get an icon in the tray to allow for service
control/configuration? I have tried allow service to interact, but it
didn't work like i wanted, i could see the icon but i couldnt do anything
with the context menu.

TIA.
 
Clay Wilcox said:
How can i get an icon in the tray to allow for service
control/configuration? I have tried allow service to interact, but it
didn't work like i wanted, i could see the icon but i couldnt do anything
with the context menu.

The common pattern is to develop a Windows service and a separate Windows
Forms application that provides the UI for the service. There are different
ways to set up communication between the service and the UI application, for
example remoting or sockets.
 
Hi Clay,

Based on my understanding, you want to implement a system tray to config
and control certain windows service.

To control the normal behavior of windows service, we may use create a
winform application, then use ServiceController to control its stop or
start etc, for more information, please refer to:
"Controlling a Windows Service from the System Tray"
http://www.devcity.net/net/article.aspx?alias=servicecontroller

Also, we may listen the status of windows service
"Windows Service State Publisher"
http://www.codeproject.com/csharp/ServiceStatePublisher.asp

But if you want to do more communication with Windows service in a UI
component, just as Herfried said, we should do the communication through
cross process pattern, then use remoting to do the connection.
=======================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top