0

How to set opposite interval of timer control

For Example:
If timer interval is set to low that progress bar speed is slow
If timer interval is high that progress bar speed is high.

3
Contributors
2
Replies
12
Views
3 Years
Discussion Span
Last Post by rishif2
0

You set the interval to whatever value you want.

yes , you can set interval property to the value what you want .

If timer interval is set to low that progress bar speed is slow
If timer interval is high that progress bar speed is high.

what value you consider to be high or low ?

lets see here :-

Private Sub Form_Load()
HighValue=1000
If Timer.Interval >= HighValue Then
Timer.Interval = Timer.Interval / 10
Else
Timer.Interval = Timer.Interval * 10
End If
End Sub

Here i'm considering 1000(1 second) as HighValue and you can set this while design time also.If interval is high then it will set it by dividing it to 10 so you get the 10th part of the value.Hence progressbar speed will be more fast as it execute timer_timer for every 1000/10 millisecond.

and when the interval value is less than 1000 then it consider as low value and multiply this value to 10.
For Example:- if you set 200 to interval while design time then the above code will set 2000(200*10) as interval value.Now speed will be slow as timer executes the code after 2 seconds.

hope this explaination helps you .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.