Davin Studer
Davin Studer

Reputation: 1611

Flash Video Displaying Wonky in WinForms WebBrowser Control

Here is the issue. I'm making a web browser for my 3 year old so that I can specify which sites he can go to and make it easy for him to get to those sites. One of the sites that I have specified is the Disney Junior site. http://disney.go.com/disneyjunior However, when I load up that site in the WebBrowser control the flash is kinda wonky. This is the only flash site that does this. The top and side nav are like twice the size they should be. This has happened on multiple machines, so it's not just my dev box. Also, the site looks just fine in IE9. I've been pulling my hair out trying to figure out what is happening, but I'm running dry on ideas. At first I though it had something to do with zoom in IE, so I created a new control inherited from the WebBrowser control and added a zoom property, but that didn't fix it. Then I thought maybe the User Agent string might be an issue so I tried modifying it to no avail ... plus it turns out that the WebBrowser control identifies itself as IE9 anyway ... so that's not it. I've thought about using GeckoFX or Webkit.NET, but those projects are both way out of date, so I would rather use something more modern like the built in IE control (ironic, I know). Plus there would just be less external dependencies.

The way to repilcate this issue is simply...

 1. Create a new winform project
 2. Drop a WebBrowser control on the form and dock it full to the winform
 3. In the form onload event add this code... webBrowser1.Navigate(@"http://disney.go.com/disneyjunior");
 4. When the site opens up it will probably look normal, but give it an F5
    refresh and you should see the nav go wonky...and it will stay that
    way ... forever ... even the next time you restart the project (possibly a cache issue?)

Any thoughts on things to try or solutions would be much appreciated. I'm up for doing the coding, but at this point I'm stumped as to what might be happening, so I thought I would appeal to those smarter than me.

Upvotes: 3

Views: 855

Answers (1)

Davin Studer
Davin Studer

Reputation: 1611

I've done a bunch of searching and it looks like the web browser control has some issues with cross domain resources and caching. I'm not sure that it can be worked around. So, I dumped the native webrowser control and went with gecko and a .NET wrapper called GeckoFX. If you have an answer for this I will transfer the accepted answer check to your answer.

Upvotes: 0

Related Questions