Re: Webbrowser control Documentcomplete



Yes and the answer is add this to the document complete event:

Do While WebBrowser1.Busy = True
DoEvents
Loop

Plus:

On Error Resume Next
Do While WebBrowser1.Document.frames(3) is nothing = True
Err.Clear
DoEvents
Loop



hth.

R.T.Edwards -- pwpsquared.com

Home Of: DevDiagnostics With Safe For Scripting, Safe For Initialization key
management

http://www.download.com/DevDiagnostics-with-SafeKeys/3000-2408_4-10438225.html?tag=lst-0-1

DevDiagnostics is a framework that provides an interface to lots of
different diagnostic and informational tools. System and network
configuration are easily viewed, with links to system tools to change
information when appropriate. Safekeys allows you to easily turn on or off
the registry settings that allow safe for scripting and safe for
initialization. Overall, this tool makes it easy to find information on
whatever issues your programs may be encountering on a system.

"pokpoki" <pokpoki@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A998E2DE-5644-43E5-8C0D-48859FE3B2D7@xxxxxxxxxxxxxxxx
>I have the following trouble with the documentcomplete event.
> --------------------
> Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As
> Variant)
> Text3.Text = _ WebBrowser1.Document.frames(3).Document.body.innertext
> End Sub
> ----------------
>
> The problem is that the Documentcomplete sub routine fires before the page
> shows in the webbrowser window. I have tried with for next loops and the
> timer control to force delays several praces in the code, but that seems
> to
> halt the web browser control.
>
> If I add a message box and wait till the page shows, it works fine.
>
> Any help will be highly appreaciated as this problem is driving me mad!
> :-)
>
> Best regards
>
> pokpoki
>


.



Relevant Pages

  • Re: Web Browser Control Unload?
    ... hth. ... DevDiagnostics With Safe For Scripting, ... > loading a nice lava loop, sometimes these can be 30-40MB a piece. ...
    (microsoft.public.vb.controls.internet)
  • Re: Buffer overflow Article - CACM
    ... > Dmitry A. Kazakov wrote: ... >>>Ada.Container does provide safe iteration construct, ... >>>iteration will be safe. ... > for I in X'Range loop ...
    (comp.lang.ada)
  • Re: mutex question
    ... do you think it is safe with only two threads?" ... this does assume that reading/writing the variable is ... case could turn the while loop into "while" since ... That keyword is there for a reason.) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: fillchar type question
    ... > of Delphi. ... Using a loop to initialize the values is certainly more ... Please elaborate on "safe" ...
    (borland.public.delphi.language.objectpascal)
  • WebBrower Control Printing
    ... I created WebBrower object in the form then send the url once the documentcomplete then call print. ... But the loop cant wait for the documentcomplete to fired. ... private sub wbPrint_documentcomplete (...... ...
    (microsoft.public.vb.controls)

Loading