Post by Nathan Lecompte on Jan 21, 2016 14:08:18 GMT 10
This is all you need to do to fix your problem: If CefSharp.Cef.IsInitialized = True Then Else Dim set1 As New CefSettings set1.UserAgent = ("Mozilla/5.0 Windows NT 6.1 AppleWebKit/537.36 KHTML, like Gecko Chrome/45.0.2454.101 Safari/537.36 MyBrowserName 1.0.0.0") CefSharp.Cef.Initialize(set1) End If
What the error is saying is that it's Initializing Cef multiple times, I'm guessing you have a control for your tab and when the add tab button is clicked; the control is duplicated therefore sending the same settings on start-up (therefore initializing it multiple times), which is why you need to make sure you check if it hasn't already been initialized...make sense?
|
|
Post by ranilwallace on Jan 21, 2016 21:57:10 GMT 10
I kinda figured that out lol. Its just the loading issue now j have
Ranil, Lauve Tech
|
|
Post by Nathan Lecompte on Jan 22, 2016 5:52:47 GMT 10
Haha, alrighty; well...cef is just generally hard to work with
|
|
Post by ranilwallace on Jan 22, 2016 6:40:32 GMT 10
But you used it for moondrop so thats why I'm asking you how did you handle the loadingstate and update the ui when cef is loading a page or not without getting a error like "cross-threading" and stuff.
Ranil, Lauve Tech
|
|
Post by Nathan Lecompte on Jan 22, 2016 12:18:55 GMT 10
Ooohh you're getting the annoying cross-thread calls like I had, well for some reason it's fixed for me; but what I did before that was I had to set Me.CheckForIllegalCrossThreadCalls to False....which isn't all too good of an idea...but it works at least, it's probably best to call it before a function and then set it back to True afterwards.
|
|
Post by ranilwallace on Jan 22, 2016 22:14:05 GMT 10
Oh ok i'll try that
Ranil, Lauve Tech
|
|
Post by ranilwallace on Jan 23, 2016 3:45:44 GMT 10
But what do you do now?
Ranil, Lauve Tech
|
|
Post by Nathan Lecompte on Jan 23, 2016 8:36:13 GMT 10
That should stop the cross-thread errors, but that's as much as I know so far...does it work? Have you tried Rebuilding it and then instead of debugging it just running the .EXE file from the debug folder?
|
|
Post by ranilwallace on Jan 23, 2016 11:24:52 GMT 10
it sorta works. has a few bugs. What tried to do however was create a new thread and run the loading thing on it. that sorta works as well but i havent really gotten time to carefully test them n stuff
Ranil, Lauve Tech
|
|
Post by Nathan Lecompte on Jan 23, 2016 18:03:05 GMT 10
Yeah there isn't much you can do really, apparently the best option would be to switch to CEFSharp for C# instead; since CEFSharp for VB.NET is supposedly quite glitchy
|
|