hi
how to make the process sleep until my webbrowser gets loaded.
this is my code


webbrowser1.navigate("www.google.co.in")
text=webbrowser1.document.body.innertext


pls send me the code

Use BeforeNavigate Event and NavigateComplete Event.

Ex.
Draw a Command Button (Command1) and PictureBox (Picture1)
Draw WebBrowser Control (WebBrowser1) inside PictureBox

Private Sub Command1_Click()
   WebBrowser1.Navigate ("www.google.co.in")
End Sub

Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
   Picture1.Enabled = False
End Sub

Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
   Picture1.Enabled = True
End Sub

Instead of PictureBox u can use Frame Control

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.