|
|
Rank: Newbie Groups: Member
Joined: 8/18/2026 Posts: 5
|
below code works fine if I open one application with eo.webbrowser, but cannot working(cannot get the gethtml) if two applications(as long as they are both use eo.webrowser) opened in the same computer at the same time. Could you please help me to solve it?
Public Function gethtml(url As String) As String gethtml = ""
Try Dim options As New EO.WebEngine.WebViewOptions() options.AllowJavaScript = False options.LoadImages = False EO.WebEngine.EngineOptions.Default.SetDefaultWebViewOptions(options) Catch ex As Exception End Try
Dim threadRunner As New ThreadRunner() Dim WebView As WebView = Nothing
Try WebView = threadRunner.CreateWebView()
AddHandler WebView.CertificateError, Sub(sender As Object, e As CertificateErrorEventArgs) e.Continue() End Sub
threadRunner.Send(Sub() Try WebView.LoadUrlAndWait(Trim(url)) gethtml = WebView.GetHtml() Catch ex As Exception End Try End Sub)
Catch ex As Exception Finally If WebView IsNot Nothing Then Try : WebView.Dispose() : Catch : End Try End If
If threadRunner IsNot Nothing Then Try : threadRunner.Dispose() : Catch : End Try End If End Try
End Function
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,512
|
Hi, What error do you get? Can you create a small test project and send the test project to us? See here for more details: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/18/2026 Posts: 5
|
Sorry. I spend 3 hours test my code carefully,there is no problem with your EO.webbrowser or my code, its the web problem,thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,512
|
OK. Thanks for the update.
|
|