Picture Info:

—————————–

(A) Progress Bar, Properties :

Name = ProgressBar1

Minimum (value) = 0

Maximum (value) = 100

(B) Button, Properties :

Name = Button1

Text = Button1

(C) Timer, Properties:

Name = Timer1

Enabled = False

Interval = 100

Kode (F7) :

—————-

Public Class Form1
Private Sub Timer1_Tick(ByVal sender As  System.Object, ByVal e As  System.EventArgs)Handles Timer1.Tick
 
Static TikTok As Integer
 
TikTok = TikTok + 1
 
ProgressBar1.Value = TikTok
 
If ProgressBar1.Value = ProgressBar1.Maximum  Then
Timer1.Enabled  = False 'deactivate Timer1
 
TikTok  = 0 'set static value back to 0
End If
 
End Sub
 
Private  Sub Button1_Click(ByVal sender As System.Object, ByVal e As  System.EventArgs)Handles Button1.Click
Timer1.Enabled = True 'activate Timer1
 
Timer1.Interval = 100 'set interval to 100
 
ProgressBar1.Value = 0 'set ProgressBar value  to 0
End Sub
 
End Class