A bug in webbrowser under. NET and its alternative-geckofx

Source: Internet
Author: User

Today, I am studying a small problem. When I open the iQiYi video in the webbrowser of C #, the entire flash is often biased, and there is no control bar on the progress bar.

This problem can be solved only when the screen is restored.

 

Figure 1 shows webbrowser and Figure 2 shows IE8. The entire webbrowser is biased and there is no control bar.

 

 

Then I tried to use various browsers Based on the Microsoft webbrowser control .. This issue occurs when you use vs2010 to build winform, WPF, and Silverlight webbrowser ......

 

Then I opened Linux and tried firefox without the bug.

 

So I thought, is there any Firefox control that can be used in. Net. I searched for a gecko engine component based on the. NET platform.

-- Geckofx

 

Then let down a bunch of things (it also needs flash for Windows Firefox plug-in and xulrunner)

 

I wrote a small project and tested it. Wow, it solved the problem!

 

Its method is basically the same as that of. Net webbrowser, so it will not be unfamiliar.

 

We strongly recommend this component-geckofx

 

Appendix: simple sample code.

 

 

Using system; <br/> using system. collections. generic; <br/> using system. componentmodel; <br/> using system. data; <br/> using system. drawing; <br/> using system. LINQ; <br/> using system. text; <br/> using system. windows. forms; </P> <p> using skybound. gecko; </P> <p> namespace geckofxbrowswer <br/>{< br/> Public partial class form1: form <br/> {<br/> static private string xulrunnerpath = "C: // xulrunner/"; <br/> static private string testurl = "http://www.qiyi.com/dianying/20100521/n14202.html "; </P> <p> private geckowebbrowser browser; <br/> Public form1 () <br/>{< br/> initializecomponent (); </P> <p> skybound. gecko. XPCOM. initialize (xulrunnerpath); </P> <p> browser = new geckowebbrowser (); <br/> browser. parent = This; <br/> browser. dock = dockstyle. fill; <br/>}</P> <p> private void button#click (Object sender, eventargs e) <br/>{< br/> browser. navigate (testurl); <br/>}</P> <p> private void button2_click (Object sender, eventargs E) <br/>{</P> <p >}< br/>

 

Appendix:

 

Open Source Address: http://code.google.com/p/geckofx/

Flash plug-in: http://get.adobe.com/flashplayer/otherversions/

Xulrunner: ftp://ftp.mozilla.org/pub/xulrunner/releases/1.9.0.0/runtimes/xulrunner-1.9.en-US.win32.zip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.