Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27355

Timer + progressbar help

$
0
0
Hello!

form1...
timer1.interval=4000 'outside

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

timer1.interval = textbox2.text * 1000 'in textbox2 should be written seconds, so if 30 (sec), 30 * 1000 = 30000 ms (for timer interval)
For Me.x = 1 To 6

actions

Next

I need help with making a progressbar which its min value (progressbar1.minimum = 0), max value (progressbar1.maximum = textbox2.text * 1000) and should increment each second for 1 (sec), 1000
(example: progressbar1.minimum = 0, progressbar1.maximum = 30000 so when the timer is @0 it should be progressbar1.value = 0, when @15 (half) progressbar1.value = 15000...)

work:
pressing start button, interval of 4sec(4000), doing the actions inside timer ( timer1.interval......for me.x......next), interval written in textbox2.text * 1000, doing actions..., interval written in... and so on,
while progressbar incrementing for 1sec(1000) for the 'wait time'(textbox2.text * 1000)

Viewing all articles
Browse latest Browse all 27355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>