WebBrowser control test Frame has loaded

Hi Experts,

What is the best way to test a frame has loaded into a webbrowser control.

I am trying the code below but it gives a 'Object reference not set to an instance of an object.' error.
If WebBrowser1.Document.Window.Frames("leftFrame").Document Is Nothing Then
End If

Open in new window

Who is Participating?
DColinConnect With a Mentor Author Commented:
Hi Experts,

Found answer.
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
End Sub

Open in new window

poweraddictConnect With a Mentor Commented:
See if this helps


there is also a webbrowser1.isBusy property im pretty sure
DColinAuthor Commented:

Thanks for the link but I need to know when a specific frame has loaded not when the whole page has finished loading.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.