Thanx. This brings up a question I was going to ask next anyway. What is
the best way to set up a Timer that does not hog the entire CPU? I assume
that is the System.Threading.Timer with a priority set to Normal or
something like that? I was going to instantiate a Timer and then cacll it
from a Thread. But I guess System.Threading.Timer will be better. Are
there some good examples of usage in terms of controlling some processes (I
want to be able to monitor a process from my Timer and then pause it and
restart it as needed).
Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com
www.wizo.tv
When I use this
Dim instance As New Timer
I get the error: Error 1 Overload resolution failed because no accessible
'New' accepts this number of arguments.
Yet, in the help section for Timer (in VB 2005) this is exactly the syntax
shown. I also tried:
Dim instance As Timer = New Timer
and that gives the same error.
I think you're referring to System.Threading.Timer, hence you get the
error because Timer object under System.Threading doesn't accept empty
constructor, see constructor overload list here:
http://msdn.microsoft.com/en-us/library/system.threading.timer.timer(VS.80).aspx
If you want to instantiate System.Timers.Timer, you can use it with
empty constructor to initialize Timer object:
Dim instance As New System.Timers.Timer
http://msdn.microsoft.com/en-us/library/system.timers.timer.timer.aspx
Hope this helps,
Onur Güzel