|
-
Aug 7th, 2000, 10:59 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:01 AM
#2
Junior Member
mabey Progress is an higher value then ProgressMax?
Life's hard, but the front of a train is harder 
-
Aug 7th, 2000, 11:35 AM
#3
Fanatic Member
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 #509
-
Aug 7th, 2000, 11:36 AM
#4
Just an idea that i picked up somewhere. :)
Use a ->
Code:
On error resume next
Statement. 
-
Aug 7th, 2000, 01:57 PM
#5
Kayoca is correct. The reason you get an error is because the Progressbar cannot go above a certain number. The Progress for the Webbrowser reads in thosands and can reach a million.
Code:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
Label1.Caption = "Reading - " & Progress & " of " & ProgressMax & " bytes"
End Sub
Or using a Progressbar:
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
-
Aug 7th, 2000, 05:54 PM
#6
Thread Starter
Member
Thank you
Thank you all so much, you saved my butt.
Wisdom is supreme, therefore get wisdom,
though it costs all you have, get understanding.
Proverbs 4:7
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
|