VB: WebBrowser throwing unhandled exception
Hello stackoverflow,
I'm trying to write a small program to log me in to my school's network at
startup. Everything worked fine until recently when my web browser started
throwing unhandled exceptions. This is my code:
WebBrowser1.Navigate("url")
While WebBrowser1.ReadyState <> WebBrowserReadyState.Complete
Application.DoEvents()
End While
The error is thrown at the while loop, stating that visual studio cannot
access a removed object.
What is causing this? The WebBrowser is not touched at all during runtime
except for navigation like this and I certainly did not remove it.
Thanks.
EDIT: I noticed that this exception is not thrown if the opacity of the
form is set to 100%. Any opacity setting under that causes the exception.
No comments:
Post a Comment