NotifyIcon not showing for a windows service ?

  • Thread starter Thread starter Seymen Ertas
  • Start date Start date
S

Seymen Ertas

Hey anyone seen this before ?

I followed examples from microsoft and added a notifyicon to my windows
service project and i can't get the icon to show up. Here is a checklist of
what i have tried so far:

1) Tried to make the icon 16x16
2) Made sure the icon was embedded into the exe.
3) Made sure the visible flag was set to true.
4) Included the content output from the project in the installer.

Any suggestions will be appreciated.

thank you.
seymen.
 
Hi Seymen,

Thanks very much for your feedback.

Can you show where is your used sample?

Normally, in .Net, windows service can not do the UI related operation on
window. So I think the notifyicon operation will fail.

As a workaround, I think you should make a wrapper windows form
application, which will show as a notifyicon, then in the application's
Load event, you should determine if the service is running, if not, just
install or start this windows service.

In the service's OnStart method, you should also invoke this application,
then when someone is starting this service through MMC, it will invoke this
application, and an icon will show.

====================================
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.
 
Thank you for your feed back I can post my code if you would like me to but
it's pretty much just a windows service with a notification icon. Your
explanation completely makes sense, windows services can run without anyone
being logged into the system which could mean that you have no desktop to
attach a gui to.

anyway thank you for you response.
seymen.
 
Hi Seymen,

Thanks very much for your feedback.

I am glad my reply makes sense to you. Yes, windows service is not running
in the same desktop as normal user interface.

If have any further question, Please feel free to post. Thanks

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top