Results 1 to 9 of 9

Thread: [RESOLVED] Connecting Progress Bar To Web Browser

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    Las Vegas, NV
    Posts
    301

    Resolved [RESOLVED] Connecting Progress Bar To Web Browser

    I think I screwed up something. How do I get the progress bar to show the web browser navigation process.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    Las Vegas, NV
    Posts
    301

    Re: Connecting Progress Bar To Web Browser

    still need help on this one... i've been looking all over google and MSDN with no luch...

    my progress bar control is named "toolstripprogressbar1" and the web browser control is "webbrowser1"

    how do i get the progress bar to show the web browser's page loading progress?

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connecting Progress Bar To Web Browser

    You handle the ProgressChanged event of the WebBrowser. It provides you with the current progress values and it's up to you to assign them appropriately to the progress bar.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    Las Vegas, NV
    Posts
    301

    Re: Connecting Progress Bar To Web Browser

    can you give me an example of what you mean?

    i searched this topic on here already, but i didn't find what i needed...

    i've done it twice before, but i just can't recall it... the first 2 times i had my book with me, but i don't have it now...

    how would i connect "webbrowser1" to "toolstripprogressbar1" ?

    could you give me a code that might work? i'd really appreciate it...

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connecting Progress Bar To Web Browser

    I'm sure you would appreciate it, but where's the fun in having someone else do it for you? As I said, handle the ProgressChanged event of the WebBrowser. You've created event handlers before haven't you? Also, read the documentation for the WebBrowser.ProgressChanged event. Oddly enough, it explains what it does and how to use it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    Las Vegas, NV
    Posts
    301

    Re: Connecting Progress Bar To Web Browser

    i'm pretty much getting an error on everything... i'm not sure if i'be been coding too long or what... my brain is fried... all the other coding i need is simple... except for a few things...

    ok, let's get through this... it's simple and i've done it before...

    webbrowser1.progresschanged

    is giving me an error... let me try losing the 1

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Connecting Progress Bar To Web Browser

    Again, you're saying you get an error without any indication of what it is. If you want help with an error then show us what you did and tell us what the error message is.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    354

    Re: Connecting Progress Bar To Web Browser

    VB Code:
    1. Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
    2.         Me.ProgressBar1.Maximum = System.Convert.ToInt32(e.MaximumProgress)
    3.         Me.ProgressBar1.Value = System.Convert.ToInt32(e.CurrentProgress)
    4.     End Sub

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2007
    Location
    Las Vegas, NV
    Posts
    301

    Re: Connecting Progress Bar To Web Browser

    thanks for the code... it worked perfect... i would have been at that until tomorrow when i go to storage and get my programming books...

    thanks again...

    i have no idea how to mark this as resolved... but i'm about to look again...

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