Results 1 to 5 of 5

Thread: [RESOLVED]Determine When Webbrowser Component Finished Loading

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    11

    [RESOLVED]Determine When Webbrowser Component Finished Loading

    Hi everyone! Here's my code:

    Code:
        Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
            Me.ProgressBar1.Maximum = Convert.ToInt32(e.MaximumProgress)
            Me.ProgressBar1.Value = Convert.ToInt32(e.CurrentProgress)
    Well, the progress bar works fantastic! The only problem is how my program can tell when a webpage has finished loading. Can anyone tell me what I should do?

    Thanks.
    Last edited by elemaeoh; May 2nd, 2008 at 04:54 PM.

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2008]Determine When Webbrowser Component Finished Loading

    The webpage (and/or the frames within the webpage) has finished loading when the DocumentCompleted event is raised.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    11

    Re: [2008]Determine When Webbrowser Component Finished Loading

    Ah I see. Thanks.

    One more thing though...I'm kind of really new to coding...so how would I go about and implement that?

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2008]Determine When Webbrowser Component Finished Loading

    You need to handle the DocumentCompleted event. Double click the webbrowser in the designview to bring up the codeview, have a look in the event list in the upper right part of the code area. Select the DocumentCompleted event in there and an eventhandler will automatically be generated for you.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    11

    Re: [2008]Determine When Webbrowser Component Finished Loading

    Ah. Thanks SO much!

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