S
Scott H
Hello,
I'm having a go at writing my first Windows Service in VB.NET and I'm
having a problem. I have it installed ok and started the service
sucessfully, I can stop it, and restart it fine, the problem is it
doesn't appear to be running any of my code whatsoever.
I dropped a Timer Control on the designer, set it to disabled with an
interval of 5000, went to the code window and on the OnStart Event,
typed in:
Timer1.Enabled=True
But the .Tick event never fires at all. I've tested this out by
putting a MsgBox in the Onstart event, and sure enough the service
stops right away becuase of that. I then cut it out of there, and put
it as the first thing in Timer1's .Tick event, the service runs
without stopping itself...its not hitting the Msgbox
I even tried another approach, creating a new thread in the OnStart
event, and Starting the thread, but again, the thread never starts.
It will run anything I put in the Onstart event, unless it involves
running any other Subs or Functions.
Any Help?
Scott
I'm having a go at writing my first Windows Service in VB.NET and I'm
having a problem. I have it installed ok and started the service
sucessfully, I can stop it, and restart it fine, the problem is it
doesn't appear to be running any of my code whatsoever.
I dropped a Timer Control on the designer, set it to disabled with an
interval of 5000, went to the code window and on the OnStart Event,
typed in:
Timer1.Enabled=True
But the .Tick event never fires at all. I've tested this out by
putting a MsgBox in the Onstart event, and sure enough the service
stops right away becuase of that. I then cut it out of there, and put
it as the first thing in Timer1's .Tick event, the service runs
without stopping itself...its not hitting the Msgbox
I even tried another approach, creating a new thread in the OnStart
event, and Starting the thread, but again, the thread never starts.
It will run anything I put in the Onstart event, unless it involves
running any other Subs or Functions.
Any Help?
Scott