Solved

WebBrowser control test Frame has loaded

Posted on 2009-05-10
3
539 Views
Last Modified: 2012-06-27
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

0
Comment
Question by:DColin
  • 2
3 Comments
 
LVL 6

Assisted Solution

by:poweraddict
poweraddict earned 500 total points
ID: 24351379
See if this helps

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22515250.html


there is also a webbrowser1.isBusy property im pretty sure
0
 

Author Comment

by:DColin
ID: 24361553
poweraddict:

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

Accepted Solution

by:
DColin earned 0 total points
ID: 24634207
Hi Experts,

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

        ListBox1.Items.Add(e.Url)
 

End Sub

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Showdialog 8 29
VB.NET bulk update  of a table from another table 4 34
Advice in Xamarin 21 44
Help with LINQ and XML 10 25
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now