Advertisement
6_2008-2009 Internet/ HTML #212029

a - Navigate And Wait a Web Browser Control

Navigate a web browser control and wait for it to finish loading before going on to the next lines of code!

AI

Resumen de IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Código fuente
original-source
'This is the NavigateAndWait sub.
'rURL is the hyperlink that you want the web browser control to navigate to.
'rWebBrowser is the web browser control that you would like to use.
Public Sub NavigateAndWait(rURL As String, rWebBrowser As Control)
rWebBrowser.Navigate rURL 'Navigate to any URL.
Do Until rWebBrowser.ReadyState = READYSTATE_COMPLETE 'Loop until the web browser control is ready.
  DoEvents 'This will stop the program from locking up while waiting, and allow other code to continue processing.
Loop
End Sub
Private Sub Command1_Click() 'This is an example button.
NavigateAndWait "http://www.Planet-Source-Code.com", Me.WebBrowser1 'This is an example on how to call the NavigateAndWait sub.
MsgBox "Loaded!" 'This is a message box to alert you that the page has been loaded. This line is not required.
End Sub
Comentarios originales (3)
Recuperado de Wayback Machine