Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
can i create a webbrowser in backgroundworker thread in a function and dispose it before function ends?
When i try to make a webbrowser, it say activex control cannot be instantiated because the current thread is not in a single threaded apartment.
if i put the webbrowser in the progresschanged, the backgrounderworker thread will end before progresschanged end. I need the webbrowser be done before all threads are done.
I use the webbrowser to login to the website and get the cookie. I tried webrequest but that gave me 417 error.
Now i am trying to move all of it into backgroundworker.
When i try to make a webbrowser, it say activex control cannot be instantiated because the current thread is not in a single threaded apartment.
if i put the webbrowser in the progresschanged, the backgrounderworker thread will end before progresschanged end. I need the webbrowser be done before all threads are done.
I use the webbrowser to login to the website and get the cookie. I tried webrequest but that gave me 417 error.
Now i am trying to move all of it into backgroundworker.
Last edited: