كيف اجعل التايمر يقف عند وصوله 30% علي البروجرس بار 4 ثواني ومن ثم يكمل عد حتي يصل الي 60% ويقف 4 ثواني وثم يكمل عد حتي يصل 90% ويقف 4 ثواني كيف يتم ذلك
02-11-19, 10:23 AM (آخر تعديل لهذه المشاركة : 02-11-19, 10:26 AM {2} بواسطة baha.)
السلام عليكم ورحمة الله وبركاته
كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ProgressBar1.Maximum = 100
Timer1.Interval = 1000
Timer1.Start()
End Sub
'لحساب الأربع ثوان
Dim count As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If ProgressBar1.Value <> 30 And ProgressBar1.Value <> 60 And ProgressBar1.Value <> 90 Then
ProgressBar1.Value += 1
Else
If count = 4 Then
ProgressBar1.Value += 1
count = 0
Else
count += 1
End If
End If
If ProgressBar1.Value = 100 Then
Timer1.Stop()
End If