I am trying to use an timer control in my console application Friend WithEvents XTIMER As System.Windows.Forms.Timer I am getting its all the properties.I have set the interval to 15000 ms.but even if i am setting the enabled state of the timer control to be true,the tick event is not firing.Can any one help me out please!!!!! Thanks in advance
A:
Use System.Timers.Timer instead. Here's a very good comparison of the timer classes.
Tom Juergens
2010-09-29 09:05:14
@@ To ALL,All these works fine in Desktop application but it is not working in onsole Application.The tick event is not firing
Rajdeep
2010-09-29 10:20:41
@M.H Thanks...This articled helped me.Appreciate your help
Rajdeep
2010-09-29 10:25:45
very nice to hear that..
M.H
2010-09-29 10:58:46
A:
Import the System.Windows.Forms
reference and use the Timer
class.
Alex Essilfie
2010-09-29 10:15:39
A:
Module Module1
Sub Main()
aTimer.AutoReset = True
aTimer.Interval = 2000 '2 seconds
AddHandler aTimer.Elapsed, AddressOf tick
aTimer.Start()
Console.ReadKey()
End Sub
Dim aTimer As New System.Timers.Timer
Private Sub tick(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs)
Console.WriteLine("tick")
End Sub
End Module
dbasnett
2010-09-29 12:04:01