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.

I'm not sure what you are asking. You set the interval to whatever value you want.

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 .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.