Windows Develop Bookmark and Share   
 index > Windows Forms General > How to know the web bowser control has been loaded fully
 

How to know the web bowser control has been loaded fully

Hi ,

I am using a web browser control in my windows form. I need toperform some additional functionality after loading a webpage into the web browser control.

Is there any event or function exists where I can know the web control has been loded fully with the web page. Something similar to the "unload" event of web aplications.


Thank You
Lucky-1983  Tuesday, May 05, 2009 6:39 AM
Hi Lucky-1983,

If there are many frames loaded, and those frames which fire DownLoadBegin event will also fire DocumentComplete event. Refer to this document for more factors which can cause DocumentCompleted event fired.

You will find in the document that once the top-frame fires the DocumentCompleted event, the page is loaded. We can firgure out a solution with this feature. Please refer to this KB article for sample code.

If you have anything unclear or further problem, please feel free to let me know.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, May 06, 2009 8:06 AM
Handle the Document_Completed event.

Thanks, A.m.a.L | [Remember to click "mark as answered" when you get a correct reply to your question]
A.m.a.L - aditi.com - Think Product  Tuesday, May 05, 2009 7:04 AM
I have tried the document_completed event. For web pages like "msdn.com" or "google.com" its firing once aftre the page loads. But in my case (I am trying to loadmy ownweb page), the event is getting fired 4 times. My web page has a web player associated with. Is this problem is related with the web player. Is thr any solution for this?

Thank You
Lucky-1983  Tuesday, May 05, 2009 7:18 AM
Once the event got fired, remove the eventhandler.

When you start loading another page, register for the event again.

Thanks, A.m.a.L | [Remember to click "mark as answered" when you get a correct reply to your question]
A.m.a.L - aditi.com - Think Product  Tuesday, May 05, 2009 7:24 AM
Hi Lucky-1983,

If there are many frames loaded, and those frames which fire DownLoadBegin event will also fire DocumentComplete event. Refer to this document for more factors which can cause DocumentCompleted event fired.

You will find in the document that once the top-frame fires the DocumentCompleted event, the page is loaded. We can firgure out a solution with this feature. Please refer to this KB article for sample code.

If you have anything unclear or further problem, please feel free to let me know.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, May 06, 2009 8:06 AM

You can use google to search for other answers

Custom Search

More Threads

• Change object from another form
• Combobox | Drop Down Height
• getting media files from a winform
• Syncing data between database and desktop app
• Typing in a ListView with check boxes causes beeps or unwanted checks
• Applications versions in C#.net
• Enable and Disable a Button
• Autocomplete ComboBox
• dsoFramer 1.3 cannot open two Excel documents
• how to declare a string