Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Vb.net progressbar with timer1 in visual studio win app

Avatar of PeterBaileyUk
PeterBaileyUk asked on
Visual Basic.NETMicrosoft Visual Studio
11 Comments1 Solution694 ViewsLast Modified:
I would like to make my progressbar move forward every second, when it reaches the bar width then goes back to the beginning and keeps doing that until the timer is stopped. its more of a working indication as I am starting and stopping in on a sql usp call that takes about 4 minutes. currently the bar does not show any progress

    Private Sub Panel1_Click(sender As Object, e As EventArgs) Handles Panel1.Click
        MessageBox.Show("Short Strings will be created, click to continue, this process. its 1 sql event which takes about 4 minutes, so wait for the next message as progress bar wont update with this procedure call. after clicking ok")
        Me.Timer1.Enabled = True
        Me.Timer1.Interval = 1 * 1000
        Call CreateAllStrs()
        MessageBox.Show("Short Strings Created")
        Me.Timer1.Enabled = False
    End Sub

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

        If ProgressBar2.Value <= 10000 Then
            ProgressBar2.Value = ProgressBar2.Value + 1
            ProgressBar2.Value = 1

        End If
    End Sub
Avatar of Ryan Chong
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answers