DownloadComplete

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GS

    #1

    DownloadComplete

    is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?

    and if there is, what is the name for the event object?


  • Cor Ligthert [MVP]

    #2
    Re: DownloadComplet e

    GS,
    is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
    >
    You seems to be for me a funny guy.
    I have given you the link to that yesterday.

    Cor

    "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hreef in bericht
    news:e6gYW2K1GH A.1252@TK2MSFTN GP04.phx.gbl...
    is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
    >
    and if there is, what is the name for the event object?
    >
    >

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: DownloadComplet e

      "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hrieb:
      is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
      Select the control in VS' text editor's left combobox and choose the event
      from the combobox on the right top edge of the text editor.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      • GS

        #4
        Re: DownloadComplet e

        not quite as smart programmaticall y as in younger days? maybe. However I did
        see the link but could not get vb express to show anything close to
        downloadcomplet e

        after some further research, I end up doing
        Public Event DownloadComplet e(ByVal sender As Object, ByVal e As EventArgs)


        Private Sub webBrowser_Down loadComplete(By Val sender As Object, ByVal e As
        EventArgs) Handles webBrowser.Down loadComplete
        RaiseEvent DownloadComplet e(sender, e)

        End Sub


        However, I found out that does not work the way I want. Donwload Complete
        fires mnaytimes, while the so call navigatecomplet e fires when the browser
        may still be trying to render page. consequently that is not good enough
        for my task.

        "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
        news:u0xRo7L1GH A.2196@TK2MSFTN GP06.phx.gbl...
        GS,
        >
        is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?
        You seems to be for me a funny guy.
        I have given you the link to that yesterday.
        >
        Cor
        >
        "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hreef in bericht
        news:e6gYW2K1GH A.1252@TK2MSFTN GP04.phx.gbl...
        is there such thing as DownloadComplet e for AxSHDocVw.AxWeb Browser?

        and if there is, what is the name for the event object?
        >
        >

        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: DownloadComplet e

          "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hrieb:
          However, I found out that does not work the way I want. Donwload Complete
          fires mnaytimes, while the so call navigatecomplet e fires when the browser
          may still be trying to render page. consequently that is not good enough
          for my task.
          What about this solution?

          \\\
          Private Sub WebBrowser1_Doc umentCompleted( _
          ByVal sender As Object, _
          ByVal e As WebBrowserDocum entCompletedEve ntArgs _
          ) Handles WebBrowser1.Doc umentCompleted
          If Me.WebBrowser1. ReadyState = WebBrowserReady State.Complete Then
          MsgBox("Documen t and frames loaded!")
          End If
          End Sub
          ///

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

          Comment

          • GS

            #6
            Re: DownloadComplet e

            thank you for setting me on the right track.


            Since I don't work directly with webbrowser control but the encapsulated
            AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event as webOCWrapper
            I had your idea added there.
            Private Sub webBrowser_Docu mentComplete(By Val sender As Object, ByVal e
            As AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event) Handles
            webBrowser.Docu mentComplete
            Try
            doc = CType(webBrowse r.Document, MSHTML.HTMLDocu ment)
            Catch
            ' Not a fatal error - we might be hosting a Word doc in-place,
            ' e.g.
            End Try

            ' Bubble up to our host.
            If Me.webBrowser.R eadyState = WebBrowserReady State.Complete Then
            'MsgBox("Docume nt and frames loaded!")
            RaiseEvent TopLevelDocumen tComplete(sende r, e)
            End If

            End Sub

            and TopLevelDocumen tComplete was declared there as
            TopLevelDocumen tComplete

            Those accomplish what I need. thank you all again for all your patience.

            "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atwrot e in message
            news:ehjlrPZ1GH A.2516@TK2MSFTN GP06.phx.gbl...
            "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comsc hrieb:
            However, I found out that does not work the way I want. Donwload
            Complete
            fires mnaytimes, while the so call navigatecomplet e fires when the
            browser
            may still be trying to render page. consequently that is not good
            enough
            for my task.
            >
            What about this solution?
            >
            \\\
            Private Sub WebBrowser1_Doc umentCompleted( _
            ByVal sender As Object, _
            ByVal e As WebBrowserDocum entCompletedEve ntArgs _
            ) Handles WebBrowser1.Doc umentCompleted
            If Me.WebBrowser1. ReadyState = WebBrowserReady State.Complete Then
            MsgBox("Documen t and frames loaded!")
            End If
            End Sub
            ///
            >
            --
            M S Herfried K. Wagner
            M V P <URL:http://dotnet.mvps.org/>
            V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
            >

            Comment

            Working...