Click here to Skip to main content
15,916,693 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one Windows service which is running in background sucsessfully but i want to show it in system tray so that i can check it in tray whether it is running or stoped. and able to change its configuration as like in control panel.

How could I achieve this?
Thnks in advance!!
Posted

1 solution

Well ... an answer to this is 'you don't' - you have two separate programs, your service and a system tray app and you communicate between them - using some form of IPC - for example, named pipes - here's one discussion you may find useful Interaction between services and applications at user level in Windows Vista[^] - you can also uses TCP/IP sockets etc

You can also (from the System Tray App) issue 'custom commands' to the service through the SCM

[modified]
The two links for Custom Commands are https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.executecommand(v=vs.110).aspx[^] and https://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase.oncustomcommand(v=vs.110).aspx[^] [/modified]

'g'
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900