I’ve made an Internet Browser in VB 6.0 and i have given a progress bar to it…
when the link is entered and after clicking on “GO.” button value of progress bar starts increasing but when it fills completely the ERROR comes..
Run time Error ‘380’:
Invalid Property value.
Private Sub Command1_Click()
WebBrowser1.Navigate Text1.Text
End Sub
Private Sub Command2_Click()
WebBrowser1.GoBack
End Sub
Private Sub Command3_Click()
WebBrowser1.GoForward
End Sub
Private Sub menuchangetheme_Click()
CDB1.ShowColor
Form1.BackColor = CDB1.Color
End Sub
Private Sub menuexit_Click()
End
End Sub
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
ProgressBar1.Value = 0
If ProgressBar1.Value <> Val(ProgressBar1.Max) Then
ProgressBar1.Value = ProgressBar1.Value + Val(Progress)
ProgressBar1.Max = ProgressBar1.Value + 1
Else
ProgressBar1.Value = 0
End If
End Sub
The parameters Progress and ProgressMax are already numeric so you do not need to convert them. As Deanna pointed out, your code is adding Progress to the Value of the progressbar. The error occurs because you attempt to assign a value greater than the progressbar Max property.