How can I add an icon at the right button taskbar to control windows services

  • Thread starter Thread starter Mullin Yu
  • Start date Start date
M

Mullin Yu

hi,

how can i add an an icon at the right button taskbar like that for MS-SQL
server that i can have two options

- Start
- Stop

which will call the OnStart of my Windows service and OnStop of my Windows
service respectively.
 
Hi Mullin Yu,

I haven't checked this for a windows service, but the tray icon can be added with a NotifyIcon. Also, add a ContextMenu and attach it to the icon.
 
Hi,

Take a look at the ServiceController component. It will do the trick. From
the property windows you can select the service you want to control, take a
look at the help for further details


Cheers,
 
Back
Top