Win Form托管Web浏览器控件最小化和还原问题 [英] Win Form hosting Web browser control minimise and restore problem

查看:149
本文介绍了Win Form托管Web浏览器控件最小化和还原问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Winforms中使用Web浏览器控件.我正在使用webBrowser.Navigate(@"C:\ Log.html")加载几乎5MB的文件.它可以很好地导航.现在我有问题了.向下滚动到页面末尾并最小化表单后,我的应用程序将挂起一段时间,当我将表单从最小化状态恢复为正常状态时,它将再次挂起一段时间,并且看起来页面正在再次加载.滚动条的位置也会更改,并从页面末尾向上移动.你能帮助我吗.在此先感谢..

I am using web browser control in winforms. I am loading almost a file of size 5MB using webBrowser.Navigate(@"C:\Log.html"). It navigates fine. Now I have problem. Once I scroll down to the end of the page and minimise the form, my application will hang for some time and when I bring the form from minimise state to normal it again hangs for some time and it appears that the page is loading once again. The scroll bar position also changes and moves up from the end of the page. can you help me. Thanks in advance..

推荐答案

挂起可能是由于webbrowser控件试图格式化已加载的数据而导致的.

The hanging may be as a result of the webbrowser control trying to format the data that is loaded.

您可能希望将加载操作等移至后台工作进程中,以防止主gui锁定.

You may want to move the load operation etc. into a background worker process to prevent the primary gui from locking up.


这篇关于Win Form托管Web浏览器控件最小化和还原问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆