Progress Bar

How can I code the progress bar?

Comments

  • : How can I code the progress bar?
    :
    i'll try a simple progress bar, its not monitoring any task

    Dim min As Integer = 0
    Dim min As Integer = 100
    Dim prgBar As ProgressBar

    Private Sub InitPrgBar() ' Initialize values of progress bar
    prgBar.Minimum = min ' set minimum value of progress bar
    prgBar.Maximum = max ' set maximum value of progress bar
    End Sub

    ' ProgressBar.Value is the current value and is used to update bar

    Public Sub activatePrgBar()
    For I = min To max
    If prgBar.Value < max Then
    prgBar.Value = prgBar.Value + 1
    End if
    Next
    End Sub
  • : : How can I code the progress bar?
    : :
    : i'll try a simple progress bar, its not monitoring any task
    :
    : Dim min As Integer = 0
    : Dim min As Integer = 100
    : Dim prgBar As ProgressBar
    :
    : Private Sub InitPrgBar() ' Initialize values of progress bar
    : prgBar.Minimum = min ' set minimum value of progress bar
    : prgBar.Maximum = max ' set maximum value of progress bar
    : End Sub
    :
    : ' ProgressBar.Value is the current value and is used to update bar
    :
    : Public Sub activatePrgBar()
    : For I = min To max
    : If prgBar.Value < max Then
    : prgBar.Value = prgBar.Value + 1
    : End if
    : Next
    : End Sub
    :
    I guess it's not working buddy... I have tried it...
    anyway, in the declaration itself you have mentioned min twice... Could you please verify. I also need this code. Thanks for the help.
  • Hello, you can follow these instructions:

    http://www.vbdotnetheaven.com/UploadFile/mahesh/ProgressBar04262005051817AM/ProgressBar.aspx

    (In case you are doing windows form programming)


    [color=Green][size=1][b]Brad Wang - .NET Freelancer from China
    MSN: [email protected]
    Skype: brad_wang[/b][/size][/color]
  • : : How can I code the progress bar?
    : :
    : i'll try a simple progress bar, its not monitoring any task
    :
    : Dim min As Integer = 0
    : Dim min As Integer = 100
    : Dim prgBar As ProgressBar
    :
    : Private Sub InitPrgBar() ' Initialize values of progress bar
    : prgBar.Minimum = min ' set minimum value of progress bar
    : prgBar.Maximum = max ' set maximum value of progress bar
    : End Sub
    :
    : ' ProgressBar.Value is the current value and is used to update bar
    :
    : Public Sub activatePrgBar()
    : For I = min To max
    : If prgBar.Value < max Then
    : prgBar.Value = prgBar.Value + 1
    : End if
    : Next
    : End Sub
    :

    I think your second line

    [code]Dim min As Integer = 100
    [/code]

    Should be

    [code]Dim max As Integer = 100[/code]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories