Reputation: 955
I'm developing a piece of software, where I have created a WebBrowser. I can't figure out how you can check if the WebBrowser has finished loading.
It would be awesome if it could run a specific function when it finishes loading.
Upvotes: 0
Views: 74
Reputation: 1048
I would assume you can use the WebBrowser.DocumentCompleted Event
Occurs when the WebBrowser control finishes loading a document.
Upvotes: 2
Reputation: 28107
Assuming you're using System.Windows.Forms.WebBrowser
you can use the DocumentCompleted
event:
webBrowser.DocumentCompleted += (sender, event) => DoSomething();
MSDN is a great resource, which should be your first port of call when wondering about Microsoft APIs like this.
Upvotes: 4