1

I am trying to use Google Maps in a Windows Form project (visual C#).

The form has a button and when the user clicks the bellow code is executed!

queryAddress.Append("http://maps.google.com/maps?z=12&t=m&q=loc:36.948827+26.982906");
webBrowser1.Navigate(queryAddress.ToString());

Normaly the browser that is embedded in the webBrowser control should have opened the map, but all I am seeing is the message for the unsupported browser!

enter image description here

I found a solution here, but either way I cannot understand it. Is there a way to define which web browser will be used by the webBrowser control?

If also anybody is boring to death and want to explain me that solution it would be greatly appreciated!

Community
  • 1
  • 1
Mr T
  • 506
  • 2
  • 9
  • 26
  • 1
    http://stackoverflow.com/questions/17922308/use-latest-version-of-ie-in-webbrowser-control You must write your application name with .exe in registry with a value, for example 11001. it means your app will use IE11. If you are not doing it, your webBrowser will be compatible with the oldest IE7. –  Jul 21 '16 at 12:18

1 Answers1

1

i am not sure if the article you posted refers to the same problem you have but i can explain what it says. The article exposes that the WebBrowser is using an olver version of IE to render the webpage and therefore it causes the error.

The solution given is to go into the windows registry, which you can do if you hit the Windows + R keys on your machine, opening a Run command and then typing in: regedit

This will open the windows registry Editor and in here you will see 4 groups of items, you will need to navigate to the one described on the article which is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl

So first open the HKEY_LOCAL_MACHINE key, that will display further options, look for the SOFTWARE key now, this will display further options so continue this process untill you reach the last node FeatureControl and here look for the node called FEATURE_BROWSER_EMULATION.

If you do not find the Wow6432Node it means your PC is 32 bits in which case you would only have to modify this in HKEY LOCAL MACHINE > SOFTWARE > MICROSOFT > INTERNET EXPLORER > MAIN > FEATURE CONTROL > FEATURE_BROWSER_EMULATION

Then right click on the right side panel and click on the NEW option that displays from the menu and then DWORD, replace New Value #1 with the name of your application.exe and then for the value put 11000.

I hope this helps

Armando Bracho
  • 659
  • 5
  • 21
  • Thanks for your answer, that is exactly what I wanted. Good and clear. Though the problem remains! – Mr T Jul 21 '16 at 13:10
  • @Skemelio Sorry to hear that, if you like check this post http://stackoverflow.com/questions/17922308/use-latest-version-of-ie-in-webbrowser-control which lets you implement an automated version of this process into your solution, the one showed there is to check and set IE version 8 but you can modify the value 8000 for the appropriated value for IE11 showed in https://msdn.microsoft.com/en-us/library/ee330730(VS.85).aspx#browser_emulation – Armando Bracho Jul 21 '16 at 14:29
  • 1
    I did it, it's working. The problem was that in debug version you have to create a DWORD for the vshost.exe file of the application! Thanks! – Mr T Jul 21 '16 at 20:10