If I use a standart web browser in visual studio -VB.net, which version of Internet Explorer will the end user be using, the version on my (debugging) PC, or the version on his PC ? And is it possible to change that ?
-
The version you referenced in your project. – Steve Jan 29 '16 at 18:38
-
That answer can have different meanings, it's not a clear answer – Mehmet Keskin Jan 29 '16 at 18:40
-
No, it's pretty clear. In your project, you reference a DLL (web browser) that is of a specific version. If the user has a new version, backwards compatibility will basically see it as your version and if they have an older version, it will fail, in essence, using no version. So the answer is, whatever version you reference in your project. – Steve Jan 29 '16 at 18:47
-
"it will fail, in essence, using no version".....what does "no version" mean ? – Mehmet Keskin Jan 29 '16 at 21:31
2 Answers
I've had issues with the browser version control and it is impacted by what browser the user has installed on their PC. With IE10/11 you cant properly set the compatibility mode in your .NET app either.
My solution was to use Gecko which is a relative of FireFox for .NET as a replacement to WebBrowser:
You need to download and add references for Geckofx-Core and Geckofx-Winforms dll's.
Imports Gecko
Imports Gecko.DOM
...
'In your form load:
Gecko.Xpcom.Initialize("xulrunner\")
..
'In a function:
'Here i used a Tab
Dim tabA As New TabPage
Dim browser As New GeckoWebBrowser
web_br = browser
browser.Dock = DockStyle.Fill
tabA.Controls.Add(browser)
Me.TabControl1.TabPages.Clear()
Me.TabControl1.TabPages.Add(tabA)
Me.TabControl1.SelectedTab = tabA
CType(TabControl1.SelectedTab.Controls.Item(0), GeckoWebBrowser).Navigate(Application.StartupPath & "\PathTo\index.html")

- 1,409
- 2
- 20
- 25
-
I was using Awesomium but it has no x64 support, so I switched back to IE, but I am still not sure how it will work out. Gecko is an alternative I am thinking about. But I only need my application to run IE10 minimum, so it would be easier to use Explorer. – Mehmet Keskin Jan 29 '16 at 20:55
-
I had to switch because IE10 and newer block certain features for sites that are loaded directly from disk versus an http:// url and I didn't want to add a webserver into my app. – Steve Seeger Jan 29 '16 at 20:57
The WebBrowser control in VB/NET and C# always defaults to showing pages in IE 7 "document mode", which means that the browser acts as Internet Explorer 7 regardless of what the actual version is.
There are ways to get the browser control to act like a newer version of IE, as long as that version or above is installed on the user's computer. Usually the solution is to use the FEATURE_BROWSER_EMULATION registry key; putting the X-UA-Compatible header in the HTML files you're going to be showing should also do the trick.
Also see: Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?

- 1
- 1

- 2,590
- 1
- 17
- 13
-
Thank you for the answer, I was inspecting that. But I think that won't do the job. If the user only has IE9, it will run IE9 maximum. Is there a way to somehow "compile IE 10 or 11" together with the application ? – Mehmet Keskin Jan 29 '16 at 22:32