Getting the Timer to start
Posted on 2009-04-02
I setup a Timer and start it with all the instructions I know of. However, it does not go to the Timer procedure until after what I am trying to time has finished.
' I START THE TIMER
Timer_Progress.Interval = 1000
Timer_Progress.Enabled = True
' I TURN ON MY PROGRESS BAR
ProgressBar1.Value = 0
ProgressBar1.BackColor = Color.Goldenrod
ProgressBar1.ForeColor = Color.Gold
ProgressBar1.Visible = True
Timer_Progress.Enabled = False
AS IT CYCLES THRU MY CODE I WANT THE BELOW PROCEDURE TO EXECUTE TO ADVANCE MY PROGRESS BAR, BUT IT ONLY GOES THERE AFTER THE ENTIRE ABOVE CODE HAS FINISHED.
Private Sub Timer_Progress_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer_Progress.Tick
ProgressBar1.Value = ProgressBar1.Value + 5