For the life of me, I can't get this to work.... What am I doing wrong?
Any help is greatly appreciated!!
Private Sub webBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
If Progress = -1 Then ProgressBar1.Value = 100
lbl1.Text = "Done"
ProgressBar1.Visible = False
If Progress > 0 And ProgressMax > 0 Then
ProgressBar1.Visible = True
ProgressBar1.Value = Progress * 100 / ProgressMax
lbl1.Text = Int(Progress * 100 / ProgressMax) & "%"
End If
End Sub
I'm not getting any error messages. The progress bar is displaying, but it's not showing any increments. I changed lbl1 to lbl1.Caption and it's giving me the error message, "'Caption' is not a member of 'System.Windows.Forms.Label'"
Is this .Net? And Windows Forms? Okay, forget about the lbl1.Caption thing. That's only for VB6 controls.
I'm not really a .Net guy, but I do know that you can't just set the values and have the progress bar magically increment itself. You have to set the progress bar maximum and minimum values, then use the PerformStep method to advance the progress bar. Here's a link to more information about using the Windows Forms Progress Bar PerformStep method.