torisch
Newcomer
Hi!
I have made a windows service application. I try to put a NotifyIcon in the system tray when the service is running, but it does not display.
I have the following code in my OnStart Sub:
The service is installing and starting OK, but the icon never appear in my system tray. I'm not very in to services, so if anyone can tell me what I'm doing wrong I will be a happy man!
Thanx!
__
Tor Inge
I have made a windows service application. I try to put a NotifyIcon in the system tray when the service is running, but it does not display.
I have the following code in my OnStart Sub:
Code:
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
Dim trayItem As System.Windows.Forms.NotifyIcon = New System.Windows.Forms.NotifyIcon()
trayItem.Icon = System.Drawing.SystemIcons.Question
trayItem.Visible = True
End Sub
The service is installing and starting OK, but the icon never appear in my system tray. I'm not very in to services, so if anyone can tell me what I'm doing wrong I will be a happy man!
Thanx!
__
Tor Inge