Why does this result in a 0?

Code Block

Dim Intervalo as Ulong = 0
Dim Workers as Ulong = 110

Intervalo = 5000 / Workers
Timer1.Interval = Intervalo



Still intervalo = 0
And timer stays at 100 Interval as default. I don't get it! What I try to do is to lower the interval as the workers gets more of.
[456 byte] By [Stigern] at [2008-1-10]
# 1

Do you have other code that is changing the interval?

i ran this code and it comes up with 45 every time

Dim Intervalo As ULong = 0

Dim Workers As ULong = 110

Intervalo = 5000 / Workers

Timer1.Interval = Intervalo

MsgBox(timer1.Interval.ToString)

js06 at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 2
Stigern wrote:
Still intervalo = 0
intervalo cannot be 0 or your code would generate an exception when you assign it to the timer interval property.
Dave299 at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 3
oh, sorry I found the problem. My bad. But thanks for the help!

Was just some writing error I got in my program wich caused the problem.

Stigern at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...