I want to make an app that gets the progress bar to 'pulse'
My code doesnt seem to work though!?!?!
I would love any help!
Thanks
My code doesnt seem to work though!?!?!
VB.NET:
Public Class Form1
Dim Value
Dim NoValue = "Add"
Private Sub Startbtn_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Startbtn.Click
ProgressBar1.Value = 1
Timer1.Enabled = True
End Sub
Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If NoValue = "Add" Then
ProgressBar1.Value = Value + 1
ElseIf NoValue = "Subtract" Then
ProgressBar1.Value = Value - 1
ElseIf Value = 0 Then
ProgressBar1.Value = Value + 1
NoValue = "Add"
ElseIf ProgressBar1.Value = 100 Then
ProgressBar1.Value = Value - 1
NoValue = "Subtract"
End If
If Value = -1 Then
Exit Sub
End If
End Sub
Private Sub Stopbtn_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Stopbtn.Click
Value = -1
End Sub
End Class
I would love any help!
Thanks