Windows Service with a notifyicon in the system tray


New member
Dec 2, 2004
Programming Experience
Hi all

I had created a windows service and also had included a notifyicon to display in the system tray. But the problem is that when i install the service everything goes well, it installs and starts running but it does not show the icon in the system tray, no exceptions or errors are coming. Here is the code for the notifyicon that I had used :

Me.icoGPS.ContextMenu = Me.mnuGPS
Me.icoGPS.Icon = CType(resources.GetObject("icoGPS.Icon"), System.Drawing.Icon)
Me.icoGPS.Text = "GPS Server"
Me.icoGPS.Visible = True

This code is executing in the InitializeComponent()

Please let me know if someone has done it successfully. You can also email me the response.

i've used the notify icon in a regular app, all i did was in the properties window of the form, i specified the Icon, ContextMenu, Text and Visible properties then it just worked based on what you put, it might be that icon line of code that's causeing it to not be displayed, try changeing the the "icoGPS.Icon" to "icoGPS.ico" or a whole other icon file and see if that works
Thanks JuggaloBrotha

I had also worked with the application and its working fine but I am checking it with windows service and looking for that.
Hi! please try this one
On services form select the service that your trying to run and
right-click on the properties. Go to Log-on tab and check the "Allow service to interact with desktop" and try to start your service again