Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net Webbrowser control display not the same

Hello i have a problems in my webbrowser control.

The page aren't displaying like in ie

a busy cat And a busy cat

As you see the top menu isn't working , and many website are glitched

like image 296
Jason Simard Avatar asked Oct 21 '22 00:10

Jason Simard


1 Answers

One way this can occur is if the browser decides to render in compatibility mode. Meaning IE decides to fix the web developers garbage whereas the webbrowser control doesn't do this automatically.

The best thing to do would be to use the right html doc type in the site. Of course, we all know that most "web programmers" have no idea what that means, and you likely have no control of the sites people are likely to visit with your app.

That said, check out the following. It shows how to inject a header into the web page as you are loading it in order to force the webbrowser control to use compatibility mode.

update decided the link wasn't that great.

see this one instead: How do I turn off Compatibility View on the IE WebBrowserControl in a WinForms app?

like image 170
NotMe Avatar answered Oct 23 '22 19:10

NotMe