-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Microsoft Forms now adds a way to generate answers to quiz questions via Copilot
By John Callaham,
- microsoft
- microsoft forms
- (and 2 more)
- 0 replies
- 0 views
-
Copilot can now offer suggestions to make better quizzes and surveys in Microsoft Forms
By John Callaham,
- microsoft
- microsoft forms
- (and 2 more)
- 0 replies
- 0 views
-
Microsoft Forms adds support for setting up rules to answer survey questions
By John Callaham,
- microsoft
- microsoft 365
- (and 2 more)
- 0 replies
- 0 views
-
Microsoft Forms finally enables collaboration feature for Microsoft account holders
By pradeepviswav,
- microsoft
- microsoft forms
- (and 5 more)
- 0 replies
- 0 views
-
Microsoft adds even more Copilot features to Forms to help write invites and more
By John Callaham,
- microsoft
- microsoft forms
- (and 2 more)
- 0 replies
- 0 views
-
Question
+Red King Subscriber²
Point of application,
Render Provided html string and print it using Internet Explorer, quickly in the background.
Problem,
WebBrowser control requires to be run in an STA thread stopping this thread (after Disposing the Web Browser) causes an IE script error.
I have a class which starts a WebBrowser Control in an STA thread,
Then, I give pipe it Html to load,
Then after it finished rendering, I tell it to print to a specific virtual printer.
That all works.
So now, I need to dispose of it.
This is what I have right now
The problem is with both renderThread.Abort() and ExitThread() - I have to commit both out not to get an error.
Both of these fail due to the WebBrowser control.
I don't feel like providing a screenshot, so here is the text,
The error comes from IE itself,
So, after calling Dispose methods including the WebBrowsers dispose method.
I try to stop the thread. Which gives me this error.
If I did NOT provide any html to render I think (been a long time) there is no Script Error.
But then, it completely kills the point of the application!
Note I do suppress Script Errors - when I created the WebBrowser.
Also, does anyone know of a way to provide images to the WebBrowser control without going through saving them to disk?
Link to comment
https://www.neowin.net/forum/topic/1151872-function-expected-ie10-script-error-on-disposing-of-webbrowser-st/Share on other sites
2 answers to this question
Recommended Posts