I’m using a C# WebBrowser in order to show a Facebook login dialog for my desktop application.
I’m regeistered on the WebBrowser.DocumentCompleted event, and once I get the URL I’m expecting, I stop the WebBrowser, and close the dialog.
For some reason, after closing the dialog, Internet Explorer suddenly opens.
I can only assume that it opens up IE (which is by the way, not even my default browser) because the web server returns the page, and my WebBrowser is already gone. Is that the case?
Any idea how to prevent it?
Thanks!
Edit: When I close the WebBrowser, it already contains the HTML that is displayed in the IE.
If it’s a popup. Why not just handle the event? You could do something like this.