Welcome Guest Search | Active Topics | Sign In | Register

Frequently open the program, often the webview can not be displayed Options
sexfio
Posted: Tuesday, July 7, 2020 12:14:49 PM
Rank: Member
Groups: Member

Joined: 3/21/2020
Posts: 12
Code: Visual Basic.NET
Public threadRunner As ThreadRunner, Wv As WebView, eng As EO.WebEngine.Engine, cachefolder As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        exePath = Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase
        exePath = New Uri(exePath).LocalPath
        ExeDir = Path.GetDirectoryName(exePath)
        cachefolder = ExeDir & "\test"

        EO.Base.Runtime.EnableEOWP = True       

        Dim options As New EO.WebEngine.BrowserOptions 
        options.EnableWebSecurity = True 
        EO.WebBrowser.Runtime.SetDefaultBrowserOptions(options)

        eng = EO.WebEngine.Engine.Create("test")
        eng.Options.CachePath = cachefolder
        WebView1.Engine = eng

        WebView1.Create(PictureBox3.Handle)
        WebView1.LoadUrl("https://www.essentialobjects.com/")
End Sub

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Try
            eng.Stop(False)
            WebView1.StopLoad()
            WebView1.Close(True) : WebView1.Destroy() : WebView1.Dispose()
        Catch
        End Try

        End
End Sub



When you run a program, then close it, and immediately rerun it again, it often happens that WebView can't display any pages。
This is really distressing. What is the reason for this ??how to fix codes? THX :)



eo_support
Posted: Tuesday, July 7, 2020 3:12:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
We are not aware of such problems. Can you isolate the problem into a small test app and send the test app to us? See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
sexfio
Posted: Tuesday, July 7, 2020 10:04:07 PM
Rank: Member
Groups: Member

Joined: 3/21/2020
Posts: 12
eo_support wrote:
We are not aware of such problems. Can you isolate the problem into a small test app and send the test app to us? See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!


Thank you. I've solved my problem



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.