|
-
Aug 7th, 2000, 10:03 AM
#1
Thread Starter
Member
ok, I want an internet status bar and this is my code:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
ProgressBar1.Max = ProgressMax
ProgressBar1.Value = Progress
End Sub
now, when I run it, when the bar get's to the end, it give me an error that says:
run-time error 380
invalid proptery value
What am I doing wrong?
Wisdom is supreme, therefore get wisdom,
though it costs all you have, get understanding.
Proverbs 4:7
-
Aug 7th, 2000, 11:34 AM
#2
Fanatic Member
Maybe at some point Progress gets bigger than ProgressMax. It would create that error.
Try This:
Code:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
If ProgressMax > Progress Then
ProgressBar1.Max = ProgressMax
ProgressBar1.Value = Progress
End if
End Sub
Post #508
-
Aug 7th, 2000, 03:59 PM
#3
You could also just ignore any error that occurs.
Code:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
Progressbar1.Min = 0
Progressbar1.Max = ProgressMax
Progressbar1.Value = Progress
End Sub
While we're on the topic of Webbrowser, I have IE 5.5, and I noticed that there are more options for the Webbrowser Control. Just a suggestion, try downloading it, you may like it. The bad thing is, well..I'm not sure if it'll still work or not but if the person has IE 5.0 or 4.0, I don't know if the options from the 5.5 IE will work when the person uses your webbrowser.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|