Alex_bg Posted May 11, 2005 Posted May 11, 2005 Hello, Is there any special reason, a timer not to work when used in a windows service application? I am using a VB .NET, below is the code of the OnStart method. Protected Overrides Sub OnStart(ByVal args() As String) Me.Timer1.Interval = 1000 Me.Timer1.Enabled = True End Sub If you need any more info, please do not hesitate to ask. Thanks, Aleksandar Quote
Wile Posted May 11, 2005 Posted May 11, 2005 Maybe i'm being very nitpicking but what timer do you use? There are three versions: System.Timers.Timer System.Threading.Timer System.Windows.Forms.Timer If you're using a System.Windows.Forms.Timer it could be that a windows service application usually doesnt have a UI so there might be something regarding forms that prevent it from working correctly. Quote Nothing is as illusive as 'the last bug'.
Alex_bg Posted May 12, 2005 Author Posted May 12, 2005 Thanks Thank you very much, this solved my problem. I changed the timer version and it started working. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.