I am using webbrowser control to parse html.
I used to have this code that works just fine
vb.net Code:
Public Shared Sub putHtmlIntoWebBrowser(ByVal html As String) 'WebBrowser.DocumentText = html WebBrowser.Document.OpenNew(True) Dim noscriptHtml = removeScript(html) appendToTextFile(noscriptHtml + vbNewLine, "laststring.html", Scripting.IOMode.ForWriting) WebBrowser.ScriptErrorsSuppressed = True WebBrowser.Document.Write(noscriptHtml) End Sub
After that I sort of manipulate the webbrowser control.
Then I modify my program. Before the code is always run from the main UI thread. Now each thread can run the code (with synclock of course).
Somehow it no longer works. webbrowser.document is simply not accessible.




Reply With Quote