Results 1 to 3 of 3

Thread: Progress bar status

  1. #1

    Thread Starter
    Member Cahlel's Avatar
    Join Date
    Aug 2000
    Location
    Earth (I think)
    Posts
    63

    Question

    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

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523
    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

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width