GerardPosada
New member
hey im trying to make a progress bar i know it needs a timer but i dont know the proper code.. this is for my class im a total newb in VB.NET lmao
thanks for your help
thanks for your help
pgBar.Maximum = dsData.Tables(0).Rows.Count - 1
pgBar.Minimum = 0
For RowCnt as Integer = 0 to dsData.Tables(0).Rows.Count - 1
'Process something here
pgBar.Value = RowCnt
Next
For RowCnt as Integer = 0 to dsData.Tables(0).Rows.Count - 1
' Process something here
pgBar.Value = Cint(100 * (RowCnt + 1) / dsData.Tables(0).Rows.Count)
Next
hey im trying to make a progress bar i know it needs a timer but i dont know the proper code.. this is for my class im a total newb in VB.NET lmao
thanks for your help
Private Const PROGRESSBAR_MIN As Integer = 1
Private Const PROGRESSBAR_MAX As Integer = 90
Private Sub PaperTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PaperTimer.Tick
PaperProgressBar.Visible = True
If PaperProgressBar.Value >= PROGRESSBAR_MAX Then
PaperProgressBar.Value = PROGRESSBAR_MIN
Else
PaperProgressBar.Value += 1
End If
End Sub