i want my button to do a few things, and then call my WebBrowser1_DocumentCompleted()
how can i do this?
Printable View
i want my button to do a few things, and then call my WebBrowser1_DocumentCompleted()
how can i do this?
You don't, or at least you definitely shouldn't, call WebBrowser1_DocumentCompleted. That's an event handler and is executed when the WebBrowser1.DocumentCompleted event is raised. Calling event handlers directly is very poor practice. If you have code that needs to be executed when the WebBrowser finishes loading a document and when a Button is clicked then put it in its own method and call that method from both the WebBrowser's DocumentCompleted event handler and the Button's Click event handler.
holy crap thanks for correcting me, that's actually what i meant; i wanted to know how to have the DocumentCompleted to call an other event handler... :/