By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,958 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,958 IT Pros & Developers. It's quick & easy.

NotifyIcon not showing for a windows service ?

P: n/a
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.
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

Nov 16 '05 #2

P: n/a
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.

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:Y7**************@cpmsftngxa10.phx.gbl...
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.

Nov 16 '05 #3

P: n/a
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.

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.