Welcome Guest Search | Active Topics | Sign In | Register

Winfom app hangs while webcontrol loads a page Options
darren
Posted: Wednesday, November 9, 2016 7:52:30 AM
Rank: Newbie
Groups: Member

Joined: 3/23/2015
Posts: 8
Hi

I have a winform app using C# .NET 4.6, VS2013, Windows 7 64-bit pro and latest version of EO Webbrowser 2016.

I have a tab control with 4 tabs and a WebControl in each one and each has a webview to a different webpage.

When I noticed that when one page is loading my whole form hags until it is finished loading.

The webview seems to load as soon as I navigate into the tab page.

Would it help if I could call the load manually and put it in a tread so as my form doesnt hang?

I am novice programmer and would appreciate some assistance.

I imagine something like this might help:

Task mytask = Task.Run(() =>
{
if (InvokeRequired)
{
this.Invoke(new Action(() => webView1.LoadData()));
return;
}

});
eo_support
Posted: Wednesday, November 9, 2016 9:54:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

This should not happen. The core browser engine is completely asynchronous (unless you explicitly use one of the blocking functions). So loading a web page should not block the UI. If you continue to have problems, please try to isolate the problem into a test project and send the test project to us. Once we have that we will investigate further. See here for more details on how to send test project to us:

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

You can not use Task.Run to send the loading to background thread. The WebView is thread specific, which means most of its methods can not be called in a different thread. So calling it in background thread will only make matter worse.

Thanks!



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.