Hi!
I hope someone can help me with this problem.
Simplified I have a made a windows service with a event handler.
In the Onstart methode the service connects to a process runing on the server...
And another methode handles events from the connected process...
The problem is that this code work fine in a windows forms application. But in a windows service there are no events. Why is it so?
Beste Regards
Pelle
I hope someone can help me with this problem.
Simplified I have a made a windows service with a event handler.
In the Onstart methode the service connects to a process runing on the server...
VB.NET:
Dim WithEvents P As PMsgCtrl.ClsDekoder
[COLOR="SeaGreen"]Protected Overrides Sub OnStart(ByVal args() As String)
P = CreateObject("PMsgCtrl.ClsDekoder", My.Settings.PMsgServerName)
....
End sub[/COLOR]
And another methode handles events from the connected process...
VB.NET:
[COLOR="SeaGreen"]Private Sub P_MsgHandler(ByRef MsgName As String, ByRef sResult As String) Handles P.GetMsg
...
end sub
[/COLOR]
The problem is that this code work fine in a windows forms application. But in a windows service there are no events. Why is it so?
Beste Regards
Pelle
Last edited by a moderator: