Question

I need to be able to display html files that are stored locally on device using a WebBrowser control on a windows form.

I simply point the WebBrowser to page like so : ctrlBrowser.Url = new Uri("file://\\My Documents\test.html");

The pages load perfectly into control except for a windows mobile 6.1 device that has opera browser also installed. Each time the above code runs, the page loads but it loads in a newly launched opera browser screen. I need to use WebBrowser control to trap navigation events etc. but cannot seem to find a way to force page to load in control when opera is installed.

Your thoughts are much appreciated as I'm against a brick wall on this one.

Was it helpful?

Solution

It's a strange side effect of the Opera browser being the default (I believe it happens if you install Opera on any WinMo device in fact). A workaround is discussed here.

OTHER TIPS

We came across this in our WM 6 program. It is due to Opera being the default system browser for the device. The workround (modifying the device registry) given by @ctacke is reputed to work correctly, but alternatively you can open Opera and use the preferences to un-set it as the default browser. We chose the latter aproach, although you could combine the two and ask the user to change their preferences if the registry is set to have Opera as default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top